Skip to content

Commit

Permalink
Add 4d support to unary_not and add tests to logical operations
Browse files Browse the repository at this point in the history
  • Loading branch information
taless474 authored and hkaiser committed Sep 6, 2019
1 parent f7d6d7e commit 940d728
Show file tree
Hide file tree
Showing 9 changed files with 531 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/plugins/booleans/unary_not_operation.cpp
Expand Up @@ -91,6 +91,13 @@ namespace phylanx { namespace execution_tree { namespace primitives
ir::node_data<std::uint8_t>{blaze::map(ops.tensor(),
[](T x) -> std::uint8_t { return x == T(0); })}};

case 4:
// TODO: SIMD functionality should be added, blaze implementation
// is not currently available
return primitive_argument_type{
ir::node_data<std::uint8_t>{blaze::map(ops.quatern(),
[](T x) -> std::uint8_t { return x == T(0); })}};

default:
HPX_THROW_EXCEPTION(hpx::bad_parameter,
"unary_not_operation::eval",
Expand Down
87 changes: 87 additions & 0 deletions tests/unit/plugins/booleans/and_operation.cpp
Expand Up @@ -1653,6 +1653,91 @@ void test_operation_3d()
R"(astype([[[0, 0], [1, 1]], [[0, 0], [0, 0]]], "bool"))");
}

void test_operation_4d()
{
// 0d
test_operation(
R"(true && astype([[[[0, 0, 1], [0, 1, 0]], [[0, 0, 0], [1, 0, 0]]],
[[[0, 1, 1], [1, 1, 0]], [[0, 0, 0], [1, 0, 0]]]], "bool"))",
R"(astype([[[[0, 0, 1],[0, 1, 0]],[[0, 0, 0],[1, 0, 0]]],
[[[0, 1, 1],[1, 1, 0]],[[0, 0, 0],[1, 0, 0]]]], "bool"))");
test_operation(
R"(false && astype([[[[0, 0, 1], [0, 1, 0]], [[0, 0, 0], [1, 0, 0]]],
[[[0, 1, 1], [1, 1, 0]], [[0, 0, 0], [1, 0, 0]]]], "bool"))",
R"(astype([[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]]], "bool"))");
test_operation(
R"(astype([[[[0, 0, 1], [0, 1, 0]], [[0, 0, 0], [1, 0, 0]]],
[[[0, 1, 1], [1, 1, 0]], [[0, 0, 0], [1, 0, 0]]]], "bool") && true)",
R"(astype([[[[0, 0, 1],[0, 1, 0]],[[0, 0, 0],[1, 0, 0]]],
[[[0, 1, 1],[1, 1, 0]],[[0, 0, 0],[1, 0, 0]]]], "bool"))");
test_operation(
R"(astype([[[[0, 0, 1], [0, 1, 0]], [[0, 0, 0], [1, 0, 0]]],
[[[0, 1, 1], [1, 1, 0]], [[0, 0, 0], [1, 0, 0]]]], "bool") && false)",
R"(astype([[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]]], "bool"))");

// 1d
test_operation(
R"([1, 0, 1] && astype([[[[0, 0, 1], [0, 1, 0]], [[0, 0, 0], [1, 0, 0]]],
[[[0, 1, 1], [1, 1, 0]], [[0, 0, 0], [1, 0, 0]]]], "bool"))",
R"(astype([[[[0, 0, 1],[0, 0, 0]],[[0, 0, 0],[1, 0, 0]]],
[[[0, 0, 1],[1, 0, 0]],[[0, 0, 0],[1, 0, 0]]]], "bool"))");
test_operation(
R"(astype([[[[0, 0, 1], [0, 1, 0]], [[0, 0, 0], [1, 0, 0]]],
[[[0, 1, 1], [1, 1, 0]], [[0, 0, 0], [1, 0, 0]]]], "bool")
&& [1, 0, 1])",
R"(astype([[[[0, 0, 1],[0, 0, 0]],[[0, 0, 0],[1, 0, 0]]],
[[[0, 0, 1],[1, 0, 0]],[[0, 0, 0],[1, 0, 0]]]], "bool"))");

// 2d
test_operation(
R"([[1],[0]] && astype([[[[0, 0, 1], [0, 1, 0]], [[0, 0, 0], [1, 0, 0]]],
[[[0, 1, 1], [1, 1, 0]], [[0, 0, 0], [1, 0, 0]]]], "bool"))",
R"(astype([[[[0, 0, 1],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 1, 1],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]]], "bool"))");
test_operation(
R"(astype([[[[0, 0, 1], [0, 1, 0]], [[0, 0, 0], [1, 0, 0]]],
[[[0, 1, 1], [1, 1, 0]], [[0, 0, 0], [1, 0, 0]]]], "bool")
&& [[1, 0, 0],[0, 1, 0]])",
R"(astype([[[[0, 0, 0],[0, 1, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 0, 0],[0, 1, 0]],[[0, 0, 0],[0, 0, 0]]]], "bool"))");

// 3d
test_operation(
R"([[[1, 0, 0]],[[0, 1, 0]]] &&
astype([[[[0, 0, 1], [0, 1, 0]], [[0, 0, 0], [1, 0, 0]]],
[[[0, 1, 1], [1, 1, 0]], [[0, 0, 0], [1, 0, 0]]]], "bool"))",
R"(astype([[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 0, 0],[1, 0, 0]],[[0, 0, 0],[0, 0, 0]]]], "bool"))");
test_operation(
R"(astype([[[[0, 0, 1], [0, 1, 0]], [[0, 0, 0], [1, 0, 0]]],
[[[0, 1, 1], [1, 1, 0]], [[0, 0, 0], [1, 0, 0]]]], "bool")
&& [[[1, 0, 0],[0, 1, 0]]])",
R"(astype([[[[0, 0, 0],[0, 1, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 0, 0],[0, 1, 0]],[[0, 0, 0],[0, 0, 0]]]], "bool"))");

// 4d
test_operation(
R"([[[[1],[0]],[[0],[1]]],[[[1],[0]],[[1],[0]]]] &&
astype([[[[0, 0, 1], [0, 1, 0]], [[0, 0, 0], [1, 0, 0]]],
[[[0, 1, 1], [1, 1, 0]], [[0, 0, 0], [1, 0, 0]]]], "bool"))",
R"(astype([[[[0, 0, 1],[0, 0, 0]],[[0, 0, 0],[1, 0, 0]]],
[[[0, 1, 1],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]]], "bool"))");
test_operation(
R"([[[[1, 0, 0]],[[0, 1, 0]]],[[[1, 1, 1]],[[0, 1, 0]]]] &&
astype([[[[0, 0, 1], [0, 1, 0]], [[0, 0, 0], [1, 0, 0]]],
[[[0, 1, 1], [1, 1, 0]], [[0, 0, 0], [1, 0, 0]]]], "bool"))",
R"(astype([[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 1, 1],[1, 1, 0]],[[0, 0, 0],[0, 0, 0]]]], "bool"))");
test_operation(
R"([[[[1, 0, 0],[1, 0, 0]]],[[[1, 0, 0],[0, 1, 0]]]] &&
astype([[[[0, 0, 1], [0, 1, 0]], [[0, 0, 0], [1, 0, 0]]],
[[[0, 1, 1], [1, 1, 0]], [[0, 0, 0], [1, 0, 0]]]], "bool"))",
R"(astype([[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[1, 0, 0]]],
[[[0, 0, 0],[0, 1, 0]],[[0, 0, 0],[0, 0, 0]]]], "bool"))");
}

///////////////////////////////////////////////////////////////////////////////
int main(int argc, char* argv[])
{
Expand Down Expand Up @@ -1724,5 +1809,7 @@ int main(int argc, char* argv[])

test_operation_3d();

test_operation_4d();

return hpx::util::report_errors();
}
67 changes: 67 additions & 0 deletions tests/unit/plugins/booleans/equal_operation.cpp
Expand Up @@ -1354,6 +1354,71 @@ void test_equal_operation_3d()
R"(astype([[[0, 0], [0, 0]], [[0, 0], [0, 0]]], "bool"))");
}

void test_equal_operation_4d()
{
// 0d
test_equal_operation(
R"(4 == [[[[1, 2], [3, 4]], [[5, 6], [7, 8]]],
[[[-1, -2], [-3, -4]], [[-5, 6], [-7, -8]]]])",
R"(astype([[[[0, 0],[0, 1]],[[0, 0],[0, 0]]],
[[[0, 0],[0, 0]],[[0, 0],[0, 0]]]], "bool"))");
test_equal_operation(
R"([[[[1, 2], [3, 4]], [[5, 6], [7, 8]]],
[[[-1, -2], [-3, -4]], [[-5, 6], [-7, -8]]]] == 4)",
R"(astype([[[[0, 0],[0, 1]],[[0, 0],[0, 0]]],
[[[0, 0],[0, 0]],[[0, 0],[0, 0]]]], "bool"))");

// 1d
test_equal_operation(
R"([3, 4, -1] == [[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]])",
R"(astype([[[[0, 0, 0],[1, 1, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[1, 0, 0]]]], "bool"))");
test_equal_operation(
R"([[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]]
== [3, 4, -1])",
R"(astype([[[[0, 0, 0],[1, 1, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[1, 0, 0]]]], "bool"))");

// 2d
test_equal_operation(
R"([[3, 4, -1],[1, 0, 1]] ==
[[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]])",
R"(astype([[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]]], "bool"))");
test_equal_operation(
R"([[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]]
== [[3, 4, -1],[1, 0, 1]])",
R"(astype([[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]]], "bool"))");

// 3d
test_equal_operation(
R"([[[3, 4, -1],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]] ==
[[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[-3, -5, 6], [3, -7, -8]]]])",
R"(astype([[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 0, 0],[0, 0, 0]],[[1, 0, 0],[0, 0, 0]]]], "bool"))");
test_equal_operation(
R"([[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[-3, -5, 6], [3, -7, -8]]]]
== [[[3, 4, -1],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]])",
R"(astype([[[[0, 0, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 0, 0],[0, 0, 0]],[[1, 0, 0],[0, 0, 0]]]], "bool"))");

// 4d
test_equal_operation(
R"([[[[3, 4, 3],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]],
[[[3, 4, -1],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]]] ==
[[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, 0, 6], [3, -7, -8]]]])",
R"(astype([[[[0, 0, 1],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[0, 0, 0],[0, 0, 0]],[[0, 1, 0],[0, 0, 0]]]], "bool"))");
}

int main(int argc, char* argv[])
{
test_equal_operation_0d_false();
Expand Down Expand Up @@ -1407,5 +1472,7 @@ int main(int argc, char* argv[])

test_equal_operation_3d();

test_equal_operation_4d();

return hpx::util::report_errors();
}
74 changes: 74 additions & 0 deletions tests/unit/plugins/booleans/greater_operation.cpp
Expand Up @@ -953,6 +953,78 @@ void test_greater_operation_3d()
R"(astype([[[0, 0], [0, 0]], [[1, 1], [1, 1]]], "bool"))");
}

void test_greater_operation_4d()
{
// 0d
test_greater_operation(
R"(4 > [[[[1, 2], [3, 4]], [[5, 6], [7, 8]]],
[[[-1, -2], [-3, -4]], [[-5, 6], [-7, -8]]]])",
R"(astype([[[[1, 1], [1, 0]], [[0, 0], [0, 0]]],
[[[1, 1], [1, 1]], [[1, 0], [1, 1]]]], "bool"))");
test_greater_operation(
R"([[[[1, 2], [3, 4]], [[5, 6], [7, 8]]],
[[[-1, -2], [-3, -4]], [[-5, 6], [-7, -8]]]] > 4)",
R"(astype([[[[0, 0], [0, 0]], [[1, 1], [1, 1]]],
[[[0, 0], [0, 0]], [[0, 1], [0, 0]]]], "bool"))");

// 1d
test_greater_operation(
R"([3, 4, -1] > [[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]])",
R"(astype([[[[1, 1, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[1, 1, 1],[1, 1, 1]],[[1, 1, 0],[0, 1, 1]]]], "bool"))");
test_greater_operation(
R"([[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]]
> [3, 4, -1])",
R"(astype([[[[0, 0, 1],[0, 0, 1]],[[1, 1, 1],[1, 1, 1]]],
[[[0, 0, 0],[0, 0, 0]],[[0, 0, 1],[0, 0, 0]]]], "bool"))");

// 2d
test_greater_operation(
R"([[3, 4, -1],[1, 0, 1]] >
[[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]])",
R"(astype([[[[1, 1, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[1, 1, 1],[1, 1, 1]],[[1, 1, 0],[0, 1, 1]]]], "bool"))");
test_greater_operation(
R"([[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]]
> [[3, 4, -1],[1, 0, 1]])",
R"(astype([[[[0, 0, 1],[1, 1, 1]],[[1, 1, 1],[1, 1, 1]]],
[[[0, 0, 0],[0, 0, 0]],[[0, 0, 1],[1, 0, 0]]]], "bool"))");

// 3d
test_greater_operation(
R"([[[3, 4, -1],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]] >
[[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]])",
R"(astype([[[[1, 1, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[1, 1, 1],[1, 1, 1]],[[0, 1, 0],[0, 1, 1]]]], "bool"))");
test_greater_operation(
R"([[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]]
> [[[3, 4, -1],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]])",
R"(astype([[[[0, 0, 1],[1, 1, 1]],[[1, 1, 1],[1, 1, 1]]],
[[[0, 0, 0],[0, 0, 0]],[[1, 0, 1],[1, 0, 0]]]], "bool"))");

// 4d
test_greater_operation(
R"([[[[3, 4, 3],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]],
[[[3, 4, -1],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]]] >
[[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, 0, 6], [3, -7, -8]]]])",
R"(astype([[[[1, 1, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[1, 1, 1],[1, 1, 1]],[[0, 0, 0],[0, 1, 1]]]], "bool"))");
test_greater_operation(
R"([[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]]
> [[[[3, 4, -1],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]],
[[[3, 4, -1],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]]])",
R"(astype([[[[0, 0, 1],[1, 1, 1]],[[1, 1, 1],[1, 1, 1]]],
[[[0, 0, 0],[0, 0, 0]],[[1, 0, 1],[1, 0, 0]]]], "bool"))");
}

int main(int argc, char* argv[])
{
test_greater_operation_0d_false();
Expand Down Expand Up @@ -991,5 +1063,7 @@ int main(int argc, char* argv[])

test_greater_operation_3d();

test_greater_operation_4d();

return hpx::util::report_errors();
}
67 changes: 67 additions & 0 deletions tests/unit/plugins/booleans/less_equal_operation.cpp
Expand Up @@ -982,6 +982,71 @@ void test_less_equal_operation_3d()
R"(astype([[[1, 1], [1, 1]], [[0, 0], [0, 0]]], "bool"))");
}

void test_less_equal_operation_4d()
{
// 0d
test_less_equal_operation(
R"(4 <= [[[[1, 2], [3, 4]], [[5, 6], [7, 8]]],
[[[-1, -2], [-3, -4]], [[-5, 6], [-7, -8]]]])",
R"(astype([[[[0, 0],[0, 1]],[[1, 1],[1, 1]]],
[[[0, 0],[0, 0]],[[0, 1],[0, 0]]]], "bool"))");
test_less_equal_operation(
R"([[[[1, 2], [3, 4]], [[5, 6], [7, 8]]],
[[[-1, -2], [-3, -4]], [[-5, 6], [-7, -8]]]] <= 4)",
R"(astype([[[[1, 1],[1, 1]],[[0, 0],[0, 0]]],
[[[1, 1],[1, 1]],[[1, 0],[1, 1]]]], "bool"))");

// 1d
test_less_equal_operation(
R"([3, 4, -1] <= [[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]])",
R"(astype([[[[0, 0, 1],[1, 1, 1]],[[1, 1, 1],[1, 1, 1]]],
[[[0, 0, 0],[0, 0, 0]],[[0, 0, 1],[1, 0, 0]]]], "bool"))");
test_less_equal_operation(
R"([[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]]
<= [3, 4, -1])",
R"(astype([[[[1, 1, 0],[1, 1, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[1, 1, 1],[1, 1, 1]],[[1, 1, 0],[1, 1, 1]]]], "bool"))");

// 2d
test_less_equal_operation(
R"([[3, 4, -1],[1, 0, 1]] <=
[[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]])",
R"(astype([[[[0, 0, 1],[1, 1, 1]],[[1, 1, 1],[1, 1, 1]]],
[[[0, 0, 0],[0, 0, 0]],[[0, 0, 1],[1, 0, 0]]]], "bool"))");
test_less_equal_operation(
R"([[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]]
<= [[3, 4, -1],[1, 0, 1]])",
R"(astype([[[[1, 1, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[1, 1, 1],[1, 1, 1]],[[1, 1, 0],[0, 1, 1]]]], "bool"))");

// 3d
test_less_equal_operation(
R"([[[3, 4, -1],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]] <=
[[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]])",
R"(astype([[[[0, 0, 1],[1, 1, 1]],[[1, 1, 1],[1, 1, 1]]],
[[[0, 0, 0],[0, 0, 0]],[[1, 0, 1],[1, 0, 0]]]], "bool"))");
test_less_equal_operation(
R"([[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, -5, 6], [3, -7, -8]]]]
<= [[[3, 4, -1],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]])",
R"(astype([[[[1, 1, 0],[0, 0, 0]],[[0, 0, 0],[0, 0, 0]]],
[[[1, 1, 1],[1, 1, 1]],[[0, 1, 0],[0, 1, 1]]]], "bool"))");

// 4d
test_less_equal_operation(
R"([[[[3, 4, 3],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]],
[[[3, 4, -1],[1, 0, 1]], [[-3, 0, -1],[2, 2, 1]]]] <=
[[[[1, 2, 3], [3, 4, 5]], [[5, 6, 7], [7, 8, 9]]],
[[[0, -1, -2], [-3, -4, -5]], [[2, 0, 6], [3, -7, -8]]]])",
R"(astype([[[[0, 0, 1],[1, 1, 1]],[[1, 1, 1],[1, 1, 1]]],
[[[0, 0, 0],[0, 0, 0]],[[1, 1, 1],[1, 0, 0]]]], "bool"))");
}

int main(int argc, char* argv[])
{
test_less_equal_operation_0d_false();
Expand Down Expand Up @@ -1020,5 +1085,7 @@ int main(int argc, char* argv[])

test_less_equal_operation_3d();

test_less_equal_operation_4d();

return hpx::util::report_errors();
}

0 comments on commit 940d728

Please sign in to comment.