Type: Posts; User: ksi

Search: Search took 0.00 seconds.

  1. How to read elements from a float16 (or other) using index?

    I'm wanting to read an arbitrary element from a float16. The kernel code below using array subscript syntax "weights[i]" works on Apple's OpenCL implementation, however it errors on Nvidia's Linux...
  2. Re: how to declare a constant array of float2 vectors?

    just an update on this, in case anybody else is running into the same issue:
    Nvidia says it should be fixed in their driver r280 release.
  3. Re: how to declare a constant array of float2 vectors?

    Care to share with us how it got resolved?
  4. Re: how to declare a constant array of float2 vectors? it should be correct syntax and should work, but doesn't. Any ideas? Bug?
  5. Re: how to declare a constant array of float2 vectors?

    Yes it is at program scope. (not function scope)
  6. how to declare a constant array of float2 vectors?

    In my kernel code I am trying to declare a constant array of float2 vectors like this:

    __constant float2 grads[2] = {(float2)(1.0f,0.0f), (float2)(0.0f,1.0f)};

    But this gives a rather...
  7. Replies

    Re: using ?: with vectors

    Yes, the select function is working, so I can proceed with that, thanks.

    However it seems like a bug since, as you quoted above, the spec claims: "If the [exp1] result is a vector value, then this...
  8. Replies

    using ?: with vectors

    What is the correct way to use the selection operator with vectors?
    For example, this works fine when a and b are floats:
    a = (b==.0f) ? .0f : a/b;
    but if they are float4 it errors when building:...
  9. Math functions take combined vector and scalar inputs

    Would be nice if built-in math functions could combine vector and scalar inputs in the same way that the intrinsic math functions do. For example, you can combine a float4 and a float with + - * / ...
  10. How to allocate arbitrary sized temp memory per work item?

    I'm trying to figure out how to best allocate some temporary memory
    per work item in my kernel. The temp memory needed can vary in size
    between about 1K and 64K bytes, depending on the overall...
  11. Replies

    OpenGL buffer from OpenCL buffer?

    Does anybody know a way to create an OpenGL buffer (GLuint) from an existing OpenCL mem buffer? I know you can go the other way using clCreateFromGLBuffer() but I'd like to keep my memory...
  12. Re: how to pass an arbirary length constant array to a kernel?

    Ok, thanks! Any more specific tips for how to correctly create and use constant memory?

    It works if I use a regular global buffer as follows:
    cl_mem weights = clCreateBuffer(ocl_context,...
  13. Thread: Gaussian blur

    by ksi

    Re: Gaussian blur

    For non-separable convolutions with large kernels, using FFTs is usually the best way to go.
    Hopefully there is some OpenCL example code for an FFT somewhere (?)
    If not, there might be one for...
  14. how to pass an arbirary length constant array to a kernel?

    What's the best way to pass an arbitrary length array of floats to a kernel? (say between 2 and 200 values)
    The array is the same for all work items, so I want to compute them on the host and then...
  15. Is there a way to GL render 3d data directly from CL memory?

    Anybody know if there is any way to render 3d vertex data directly from a CL memory buffer, without copying to host memory and back?

    For example, if I compute a surface of 3d coordinates using...
  16. How to define a function that processes N-vectors ?

    Is there a way to define a new OpenCL function that processes N-vectors, for various N, like the built-in math functions?

    For example, if overloading were supported:
    float square(float x) {...
Results 1 to 16 of 16
Proudly hosted by Digital Ocean