Results 1 to 2 of 2

Thread: How to use double in kernel function?

  1. #1
    Junior Member
    Join Date
    May 2010
    Posts
    5

    How to use double in kernel function?

    I read section 9.3 of OpenCL specification,how can I use double in a kernel function? I tried to add "#pragma OPENCL EXTENSION cl_khr_fp64:enable"on the top of kernel function,but my program failed to compile,what can I do ?
    By the way, I used "clGetDeviceInfo" to query"CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE", it returned 0,does it means my GPU support double precision or not ?

  2. #2
    Junior Member
    Join Date
    Aug 2010
    Posts
    3

    Re: How to use double in kernel function?

    You should use the CL_DEVICE_EXTENSIONS flag to query the extensions of your device. Then check if cl_khr_fp64 is supported or not. But almost sounds like it's not.

Similar Threads

  1. Replies: 0
    Last Post: 09-04-2011, 03:30 AM
  2. Replies: 4
    Last Post: 08-22-2011, 03:51 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
  •