GPGPUs
luminousone
rd.hunt at gmail.com
Sun Aug 18 01:21:17 PDT 2013
I chose the term aggregate, because it is the term used in the
description of the foreach syntax.
foreach( value, key ; aggregate )
aggregate being an array or range, it seems to fit as even when
the aggregate is an array, as you still implicitly have a range
being "0 .. array.length", and will have a key or index position
created by the foreach in addition to the value.
A wrapped function could very easily be similar to the intended
initial outcome
void example( ref float a[], float b[], float c[] ) {
foreach( v, k ; a ) {
a[k] = b[k] + c[k];
}
}
is functionally the same as
void example( aggregate ref float a[] ; k, float b[], float c[] )
{
a[k] = b[k] + c[k];
}
maybe : would make more sense then ; but I am not sure as to the
best way to represent that index value.
More information about the Digitalmars-d
mailing list