Results 1 to 2 of 2

Thread: Linking Kernel with Static Library

  1. #1
    Junior Member
    Join Date
    Oct 2012

    Linking Kernel with Static Library

    Hello all,

    I would like to link my OpenCL program with a static library (.a), such that my kernel can call the functions defined within. Currently, I am running the kernel on the CPU (not GPU); this is sufficient for my purposes. The options of clBuildProgram allow me to specify search paths for header files, but I am not certain how to instruct the compiler to link against the desired static libraries. This should be rather straightforward to do, but as a newbie to OpenCL, I require a bit of guidance in this regard.

    Thank you kindly for your help!

  2. #2

    Re: Linking Kernel with Static Library

    If I understand your question right, this .a file is standard old CPU code, that you would like to call from inside a kernel? I doubt there is any portable way to do that, precisely because the kernel might not be running on the CPU. I can't see any fundamental reason it couldn't be supported on a CPU device, but you'd need to check the docs for the specific OpenCL implementation you're using.

Similar Threads

  1. build static OpenCL library
    By chris_123 in forum OpenCL
    Replies: 2
    Last Post: 01-29-2013, 08:01 AM
  2. static linking OpenVG
    By carbonytte in forum OpenVG
    Replies: 1
    Last Post: 07-10-2010, 04:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean