Results 1 to 5 of 5

Thread: incompatible integer to pointer conversion!!

  1. #1

    incompatible integer to pointer conversion!!

    If this error is occured, what am I do it?
    Plez advise to me.

    :70: warning: incompatible integer to pointer conversion assigning 'int', expect
    ed 'int __attribute__((address_space(1)))*'
    resDestoffset = destoffset;
    ^ ~~~~~~~~~~



    "resDestoffset" is __global int*.. and "destoffset" is only "int"..
    I don't understand at openCL memory block.. -_?

  2. #2

    Re: incompatible integer to pointer conversion!!

    As you say, one of the variables is a pointer and the other is not. They cannot be assigned to each other just like that, so you have to give a better description of what you are trying to do.

  3. #3

    Re: incompatible integer to pointer conversion!!

    Quote Originally Posted by ibbles
    As you say, one of the variables is a pointer and the other is not. They cannot be assigned to each other just like that, so you have to give a better description of what you are trying to do.
    I just send from int data to __global int pointer.

    destoffset(int data) is computed in kernel source.
    And then resDestoffset(__global int*) is received the destoffset data..(I want it..)

    It is not error but warning.
    sooner or later it is occured another error.(I think it..)

  4. #4

    Re: incompatible integer to pointer conversion!!

    I guess you want to write to where the the pointer points and not to the pointer itself. The following code will do that.

    Code :
    (*resDestoffset) = destoffset;

  5. #5

    Re: incompatible integer to pointer conversion!!

    Quote Originally Posted by ibbles
    I guess you want to write to where the the pointer points and not to the pointer itself. The following code will do that.

    Code :
    (*resDestoffset) = destoffset;
    thank you for your advise.

    I just follow right now..
    If another problem is occured, I write this board. Thank you.

Similar Threads

  1. pointer type conversion
    By matilda in forum OpenCL
    Replies: 1
    Last Post: 09-27-2012, 11:33 PM
  2. Replies: 1
    Last Post: 09-01-2012, 09:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •