Skip to content

Commit

Permalink
Use cl::sycl::abs in device code (#510)
Browse files Browse the repository at this point in the history
This patch turns `std::abs` into `cl::sycl::abs` for avoiding device-side compilation issues.
  • Loading branch information
pgorlani committed Apr 11, 2024
1 parent 11e8b0b commit e5f9738
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operations/blas1_trees.hpp
Expand Up @@ -448,7 +448,7 @@ PORTBLAS_INLINE bool TupleOp<rhs_t>::valid_thread(
template <typename rhs_t>
PORTBLAS_INLINE typename TupleOp<rhs_t>::value_t TupleOp<rhs_t>::eval(
typename TupleOp<rhs_t>::index_t i) {
return TupleOp<rhs_t>::value_t(i, std::abs(rhs_.eval(i)));
return TupleOp<rhs_t>::value_t(i, cl::sycl::abs(rhs_.eval(i)));
}

template <typename rhs_t>
Expand Down

0 comments on commit e5f9738

Please sign in to comment.