-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
In order to run an algorithm on batches of vectors, I'd like to be able to send a vector of pointers to arrays. Example:
void gpu_algo(Int n, Int m, Vector<Ptr<Float>> ins, Ptr<Float> out)
{
Int inc = numQPUs() << 4;
Float acc = 0;
For (Int i=0, i < n, i = i +1)
Ptr<Float> in = ins[i] + index() + (me() << 4);
gather(in);
Float r0;
For (Int j=0, j < m, j += inc)
gather(in + inc);
receive(r0);
... do stuff ...
acc = acc + r0
in = in + inc
End
store(acc, *out);
receive(r0);
End
}
Possible ?
Metadata
Metadata
Assignees
Labels
No labels