Results 1 to 2 of 2

Thread: Using a single integer value(not a pointer as parameter for?

  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    15

    Using a single integer value(not a pointer as parameter for?

    Hello GPGPU hackers!

    How to use the normal integer values not a pionter as kernel arguments?
    can someone give here a short example?

  2. #2
    Senior Member
    Join Date
    Dec 2011
    Posts
    124

    Re: Using a single integer value(not a pointer as parameter

    Most of the OpenCL examples from any of the vendors include an example of this. It's similar to passing pointers as kernel args, but instead of passing the pointer value, you pass the address of the scalar value.

    clSetKernelArg(kernel, 0, sizeof(int), &someInt);

Similar Threads

  1. Replies: 1
    Last Post: 12-27-2012, 06:03 PM
  2. incompatible integer to pointer conversion!!
    By phoebe0105 in forum OpenCL
    Replies: 4
    Last Post: 05-02-2010, 11:40 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
  •