Skip to content

Commit

Permalink
Fix missing change from scalar to scalar_view
Browse files Browse the repository at this point in the history
  • Loading branch information
caugonnet committed Dec 12, 2024
1 parent c8df3b3 commit 8ee14bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cudax/test/stf/interface/scalar_interface.cu
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ void run()
double a = 42.0;
double b = 12.3;

auto la = ctx.logical_data(scalar<double>(&a)).set_symbol("a");
auto lb = ctx.logical_data(scalar<double>(&b)).set_symbol("b");
auto lc = ctx.logical_data(shape_of<scalar<double>>()).set_symbol("c");
auto la = ctx.logical_data(scalar_view<double>(&a)).set_symbol("a");
auto lb = ctx.logical_data(scalar_view<double>(&b)).set_symbol("b");
auto lc = ctx.logical_data(shape_of<scalar_view<double>>()).set_symbol("c");

ctx.parallel_for(box(1), la.read(), lb.read(), lc.write())->*[] __device__(size_t, auto a, auto b, auto c) {
*c.addr = *a.addr + *b.addr;
Expand Down
4 changes: 2 additions & 2 deletions cudax/test/stf/parallel_for/empty_shape_reduce.cu
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ template <typename context_t>
void run()
{
context_t ctx;
auto lsum = ctx.logical_data(shape_of<scalar<int>>());
auto lmax = ctx.logical_data(shape_of<scalar<int>>());
auto lsum = ctx.logical_data(shape_of<scalar_view<int>>());
auto lmax = ctx.logical_data(shape_of<scalar_view<int>>());

ctx.parallel_for(box(0), lsum.reduce(reducer::sum<int>{}), lmax.reduce(reducer::maxval<int>{}))
->*[] __device__(size_t, auto&, auto&) {
Expand Down

0 comments on commit 8ee14bb

Please sign in to comment.