Results 1 to 4 of 4

Thread: Translating C to opencl C, newbie

  1. #1

    Smile Translating C to opencl C, newbie

    Hello,
    Please forgive my lack of education on this matter.
    I'm certain that there are some fine manuals out there that explain this somewhere, but I have not found them.
    After having listened to a few vids on opencl I'm growing a bit confused on a few things.
    1. What is a non standard C99 header?
    2. How do you use qsort or such if function pointers are forbidden?
    3. When people say that "recursion" is forbidden, what type are they talking about?
    3.a. Suppose I have a few arrays of unknown length X and I want to use functional or for loop recursion, what do I do instead?

    Thanks

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

    Lightbulb

    Quote Originally Posted by big bug View Post
    1. What is a non standard C99 header?
    Your own header file; not those from standard library (like stdio.h)

    Quote Originally Posted by big bug View Post
    2. How do you use qsort or such if function pointers are forbidden?
    You need `pointers' for this, not `function pointers', which is OK.

    Quote Originally Posted by big bug View Post
    3. When people say that "recursion" is forbidden, what type are they talking about?
    Functions which call themselves; the most famous one is the recursive implementation of `factorial' function.

    Quote Originally Posted by big bug View Post
    3.a. Suppose I have a few arrays of unknown length X and I want to use functional or for loop recursion, what do I do instead?
    Sorry, I do not get you. Please expand your question.

    Just an advice: read a good book on the subject, it is far more productive!

  3. #3
    Quote Originally Posted by tellmewhy View Post
    You need `pointers' for this, not `function pointers', which is OK.
    I'm not quite following, could you show me a function prototype as an example?

    Quote Originally Posted by tellmewhy View Post
    Sorry, I do not get you. Please expand your question.
    You explained it in answer to 3.

    Thank you.

  4. #4
    Junior Member
    Join Date
    Aug 2017
    Posts
    3
    Does this help?

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