Search:

Type: Posts; User: danielmarjamaki

Search: Search took 0.00 seconds.

  1. Re: newbie question: what is special about conditions

    yes the memory is cleared first.

    To figure out "a" and "b" I used this code in a kernel:


    char result = 0;
    for (int a = 0; a < 2; a++) {
    for (int b = 0; b < 2; b++) {
    if ((a+b)...
  2. Re: newbie question: what is special about conditions

    To clarify that. I believe ((a+b)==(b+a)) is always true and result in 0xFFFFFFFF. And therefore out[1 & ((a+b)==(b+a))] should be the same as out[1&0xFFFFFFFF] that should be the same as out[1].
    ...
  3. Re: newbie question: what is special about conditions

    The example code is taken from a DrDobbs tutorial. I doubt they made serious mistakes, such as writing to the same variable from many work items.

    If you want a short and complete code example, we...
  4. Re: newbie question: what is special about conditions

    Thank you for the response.



    I am not sure now.. but I can try to look it up. But in my humble opinion I just think that "x=do_something();" and "if (1) x=do_something();" should do the same...
  5. newbie question: what is special about conditions

    Hi!

    I am trying to learn OpenCL.

    What is special about conditions when writing opencl code?

    The condition ((a+b)==(b+a)) should always be true in my humble opinion if a and b are integers....
Results 1 to 5 of 9