Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit e5f9738

Browse files
authored
Use cl::sycl::abs in device code (#510)
This patch turns `std::abs` into `cl::sycl::abs` for avoiding device-side compilation issues.
1 parent 11e8b0b commit e5f9738

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/operations/blas1_trees.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ PORTBLAS_INLINE bool TupleOp<rhs_t>::valid_thread(
448448
template <typename rhs_t>
449449
PORTBLAS_INLINE typename TupleOp<rhs_t>::value_t TupleOp<rhs_t>::eval(
450450
typename TupleOp<rhs_t>::index_t i) {
451-
return TupleOp<rhs_t>::value_t(i, std::abs(rhs_.eval(i)));
451+
return TupleOp<rhs_t>::value_t(i, cl::sycl::abs(rhs_.eval(i)));
452452
}
453453

454454
template <typename rhs_t>

0 commit comments

Comments
 (0)