Skip to content

Query Regarding Support for sycl::fract Function in AdaptiveCpp #1257

Closed Answered by illuhad
blinkfrog asked this question in Q&A
Discussion options

You must be logged in to vote

I don't know where the reference guide pulls this signature from. It seems wrong to me. Here's what the specification actually says for fract:

Constraints: Available only if Ptr is multi_ptr with ElementType equal to the same type as x and with Space equal to one of the writeable address spaces as defined above.

(See https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html and search for fract in your browser)

The following compiles:

#include <sycl/sycl.hpp>

int main() {
  sycl::queue q;
  q.single_task([=](){
    float f;
    sycl::fract(3.4f, sycl::multi_ptr<float, sycl::access::address_space::generic_space>{&f});
  }).wait();
}

However, upon checking again, I noticed t…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@illuhad
Comment options

Answer selected by blinkfrog
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants