[Swift-user] Re: array slicing?
Allan Espinosa
aespinosa at cs.uchicago.edu
Fri Apr 1 06:38:56 CDT 2011
Filed as Bug 307 (feature enhancement):
https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=307
2011/3/25 Allan Espinosa <aespinosa at cs.uchicago.edu>:
> Are there plans to incorporate this into the language?
>
> I want to perform some aggregate operations in subelements of my array:
>
> type file;
>
> file somearray[] <array_mapper; file='one, two, three, ..., n'>;
>
>
> file reduction1;
> file reduction2;
> file reduction3;
> file commoninput <'somefile'>;
>
> reduction1 = some_reduction(somearray[0:60], commoninput);
> reduction2 = some_reduction(somearray[61:120], commoninput);
> reduction3 = some_reduction(somearray[120:n], commoninput);
>
>
>
> I am doing this so that I have more control over the number of times
> commoninput is being staged to multiple resources.
>
>
> -Allan
>
--
Allan M. Espinosa <http://amespinosa.wordpress.com>
PhD student, Computer Science
University of Chicago <http://people.cs.uchicago.edu/~aespinosa>
More information about the Swift-user
mailing list