Search:

Type: Posts; User: Photovore

Page 1 of 4 1 2 3 4

Search: Search took 0.00 seconds.

  1. Re: problem passing struct kernel arguments (Apple)

    Noah,

    1) I didn't read carefully earlier; I pass my structure by address.

    2) My only nVidia device is in my laptop, where I run 10.7.4; indeed structProblemDemo fails:

    Available devices:
    ...
  2. Re: problem passing struct kernel arguments (Apple)

    I'm on OSX and, all day long, I pass in a structure containing dozens of variables with no problems. This struct contains bytes, ints, floats, and arrays of all three....

    no problems under...
  3. Replies
    5
    Views
    2,534

    Re: can we use compare function in kernel?

    well, if you know how long the longest one will be, and it's not too horribly huge, I'd just use a 2-d array. If you needed 20 strings of 100 length each:

    char strang[20][100]

    and then pass...
  4. Replies
    5
    Views
    2,534

    Re: can we use compare function in kernel?

    ocl c doesn't have string functions. you can write your own. the second example from this page might work as is :

    http://www.programmingsimplified.com/c- ... wo-strings
  5. Replies
    10
    Views
    5,397

    Re: can we use structure in opencl

    Thanks, Dm --

    Yes, there is one place in my structure, after lots of chars, that I inserted "char dum00;" so that all the following floats and ints would start on 4-byte boundaries. I had...
  6. Replies
    10
    Views
    5,397

    Re: can we use structure in opencl

    Well, good sir, I won't post my actual code for trade-secret reasons, but I can describe an example....

    There is a structure "varholder" that holds everything the kernel needs to know. Simplified...
  7. Replies
    10
    Views
    5,397

    Re: can we use structure in opencl

    I use one big one; it holds all of my input parameters.

    I pass in its pointer as my kernel arg 0, and then just dereference as usual to get to all of the elements. You can either £include the...
  8. Re: CL/GL Interop, OSX -- ever shared a Renderbuffer or Text

    Ok, but, did you create gl buffer objects before creating the cl context, or after? I do the gl context, then all gl buffer objects, then the cl context (due to original compartmentalization; all...
  9. Re: CL/GL Interop, OSX -- ever shared a Renderbuffer or Text

    Well, without posting at amd yet, it seems some people have problems in general if they do all the GL init first (create context, create fb, create & attach textures/renderbuffers, then create the CL...
  10. Re: CL/GL Interop, OSX -- ever shared a Renderbuffer or Text

    Ding! Yes, I did stumble across that fact via extensive searching just a few hours before you sent your message, and then at last there was "something on the screen"! From that point on it was much...
  11. Re: CL/GL Interop, OSX -- ever shared a Renderbuffer or Text

    Thanks for the pointers, folks.

    I did manage to get the cl compiler stuff redirected to the system console, ajs2, but at first that just gave me the text equivalent of error -38,...
  12. Thread: Using binary

    by Photovore
    Replies
    3
    Views
    1,947

    Re: Using binary

    You do have a clBuildProgram after your clCreateProgramWithBinary, right? You still need to call that before clCreateKernel even when you're starting with a binary....

    edit: never mind, it seems...
  13. Re: Access to Intermediate Language under Xcode / 10.7 ???

    1) I think what I may be getting under OSX (when I use the cl functions to compile the kernel)* may be Apple's "bitcode"; in any case it's a valid compilation. Yesterday I finally tried caching it...
  14. Re: CL/GL Interop, OSX -- ever shared a Renderbuffer or Text

    Nope; those are in there, but thanks for asking! I was just cherry-picking the lines of code that I thought might have an obvious bad/mismatched parameter. Those two are called, then a...
  15. Re: CL/GL Interop, OSX -- ever shared a Renderbuffer or Text

    Nope! (Though thanks for teaching me about CL_LOG_ERRORS.)

    my output to the log along the way:

    glCheckFrameBufferStatus is GL_FRAMEBUFFER_COMPLETE
    ...
    create context err= 0
    ......
  16. CL/GL Interop, OSX -- ever shared a Renderbuffer or Texture?

    Problem: Attempting to share a Renderbuffer (or a Texture) fails when clSetKernelArg() is called.

    I've spent days on this and am finally asking for help.

    My program generates frames for a video...
  17. Re: Do i have divergence with (bool)?val1:val2 operator?

    Hi o4kareg2!

    1) I will take your suggestions into consideration, and I thank you for the effort and thought involved. (The past few days, though, I have concentrated on a different area that...
  18. Re: Do i have divergence with (bool)?val1:val2 operator?

    o4kareg, you're right, my macros are super ugly!

    You gave me one idea and I spent a few hours replacing the "+" above with "|" where possible and making them even uglier (you have to use as_int4()...
  19. Re: Do i have divergence with (bool)?val1:val2 operator?

    Thanks for your input, chippies! I have nothing to add to your excellent comment but wish to expand on, and clarify, my experience:

    >Photovore's example doesn't suffer from that since all his...
  20. Re: Do i have divergence with (bool)?val1:val2 operator?

    I'd like to hear someone answer your question definitively, but here's what I have to say:

    where I had:

    if ( a < b ) c=30;
    else if ( a > b ) c=40;
    else c=35;

    ... which is the equivalent of:
  21. Access to Intermediate Language under Xcode / 10.7 ???

    I have an OpenCL kernel that runs well but I want to look at the intermediate code. I use clGetProgramInfo with CL_PROGRAM_BINARIES to pull out the binary and save it to a text file. I've tried this...
  22. Replies
    9
    Views
    3,182

    Re: Use CPU and GPU wisely

    I split my job between GPU and CPU all day long.

    For me, such a split results in about 75% of the execution time of doing it all on the GPU. Well worth my while.

    I tried a three-way split,...
  23. Replies
    4
    Views
    2,106

    Re: Structs Into Kernel?

    I can't tell you what's "allowed", but I can tell you that I pass a struct (1128 bytes) into my kernel all day long. No sub-structs within, but arrays of floats, ints, and chars, also scalars of...
  24. Re: Putting a space in path supplied to clBuildProgram()

    Well, super cool! It feels good to be useful once in a while!

    For my part, I felt stupid when I found out about the -I option. It hadn't occurred to me at all; I just blindly tried putting the...
  25. Re: Putting a space in path supplied to clBuildProgram()

    I've never used the -I parameter; I do << #include "/PATH_TO_FILES/headerfile.h" >> in the .cl under OSX, which might work with spaces
Results 1 to 25 of 79
Page 1 of 4 1 2 3 4