2 Replies Latest reply on May 29, 2010 3:19 PM by bubu

    Calling a function with pointer param

    bubu

      Can I do this in OpenCL's shaders?

       

      struct MyType

      {

          float4 a, b;

      };

       

      static inline Func1 ( MyType *t )

      {

          t->a.x += 1.0f;

          t->b.x += t->a.x;

      }

       

      __kernel MyKernel ()

      {

         MyType t;

         t.a = 10.0f;

         t.b = 20.0f;

         Func1(&t);

      }

       

      thx