Results 1 to 3 of 3

Thread: half conversion in host code

  1. #1

    half conversion in host code

    Feature request. Currently converting from float to half requires either sending the data to the GPU, or twiddling the bits yourself. Neither are rather savory. Why not include the convert_* functions on the host side? Theoretically they could be implemented as nice SIMD vector operations on the CPU too.

    Thanks,
    Brian Cole

  2. #2
    Senior Member
    Join Date
    Jul 2009
    Location
    Northern Europe
    Posts
    311

    Re: half conversion in host code

    You should be able to get a high-performance version of just this by writing a kernel to run on the CPU that does the conversion and uses CL_USE_HOST_PTR for the input memory object to avoid an extra copy.

  3. #3

    Re: half conversion in host code

    Quote Originally Posted by dbs2
    You should be able to get a high-performance version of just this by writing a kernel to run on the CPU that does the conversion and uses CL_USE_HOST_PTR for the input memory object to avoid an extra copy.
    Didn't think of that. Thanks for the advice.

Similar Threads

  1. pointer type conversion
    By matilda in forum OpenCL
    Replies: 1
    Last Post: 09-27-2012, 11:33 PM
  2. missing Double and Half FP_CONFIG
    By AlessandroBorges in forum OpenCL
    Replies: 3
    Last Post: 12-14-2009, 06:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •