cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

bubu
Adept II

Calling a function with pointer param

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

0 Likes
2 Replies
nou
Exemplar

yes

0 Likes

Originally posted by: nou yes

 

Excellent, thx!

0 Likes