Skip to content

Commit

Permalink
review updates:
Browse files Browse the repository at this point in the history
- use correct identity value
- remove incorrect comments

Co-authored-by: Tobias Ribizel <[email protected]>
  • Loading branch information
MarcelKoch and upsj committed Jul 7, 2023
1 parent a037db5 commit a01d0ab
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/base/kernel_launch_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,16 +338,15 @@ void run1d_reduction(std::shared_ptr<gko::EXEC_TYPE> exec)

{
SCOPED_TRACE("Size 0");
run_reduction(int64{1}, size_type{0});
run_reduction(int64{0}, size_type{0});

ASSERT_EQ(exec->copy_val_to_host(output.get_const_data()), int64{1});
ASSERT_EQ(exec->copy_val_to_host(output.get_const_data()), int64{0});
}

{
SCOPED_TRACE("Size 100000");
run_reduction(int64{0}, size_type{100000});

// 2 * sum i=0...99999 (i+1)
ASSERT_EQ(exec->copy_val_to_host(output.get_const_data()),
int64{10000100000});
}
Expand Down Expand Up @@ -394,23 +393,20 @@ void run2d_reduction(std::shared_ptr<gko::EXEC_TYPE> exec)
SCOPED_TRACE("Dim 0x0");
run_reduction(int64{0}, gko::dim<2>{0, 0});

// 4 * sum i=0...999 sum j=0...99 of (i+1)*(j+1)
ASSERT_EQ(exec->copy_val_to_host(output.get_const_data()), int64{0});
}

{
SCOPED_TRACE("Dim 0x10");
run_reduction(int64{0}, gko::dim<2>{0, 10});

// 4 * sum i=0...999 sum j=0...99 of (i+1)*(j+1)
ASSERT_EQ(exec->copy_val_to_host(output.get_const_data()), int64{0});
}

{
SCOPED_TRACE("Dim 10x0");
run_reduction(int64{0}, gko::dim<2>{10, 0});

// 4 * sum i=0...999 sum j=0...99 of (i+1)*(j+1)
ASSERT_EQ(exec->copy_val_to_host(output.get_const_data()), int64{0});
}

Expand Down

0 comments on commit a01d0ab

Please sign in to comment.