[Swift-user] array slicing?

Allan Espinosa aespinosa at cs.uchicago.edu
Fri Mar 25 14:01:19 CDT 2011


Hi Mike,

I think this could be added as a line to 'enhancing the library' or
Ben's 'functional iteration constructs'

-Allan

PS I don't have commit access to dev.globus as I'm not technically a
Globus committer

2011/3/25 Michael Wilde <wilde at mcs.anl.gov>:
> You could add this to the Swift GSoC page, Allan.
>
> - Mike
>
> ----- Original Message -----
>> 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



More information about the Swift-user mailing list