Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef __m128 Context;
- struct A { float k[2]; };
- struct B { float q[4]; };
- struct FTransform : thrust::unary_function<A, B>
- {
- Context context;
- FTransform(Context context) : context(context) {}
- __attribute__((device)) B operator()(const A& a) const
- {
- B b{{a.k[0], a.k[1], a.k[0]*context.n[0], a.k[1]*context.n[1]}};
- return b;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement