Skip to content

abs function #129

Open
Open
@WeiqunZhang

Description

sycl::abs(int) returns an unsigned int in contrast to int std::abs(int) in the C++ standard. For expressions like -sycl::abs(i), the result is unexpected to many users. Currently many std:: math functions are supported in device code, although std::abs is not supported yet. If std::abs is supported on device, could the spec specifically define its return type to be exactly the same as std::abs in C++ standard?

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions