Unofficial wish list status.(Mar 2009)

Tim M a at b.com
Sat Feb 28 23:22:48 PST 2009


On Sun, 01 Mar 2009 16:58:15 +1300, Jarrett Billingsley  
<jarrett.billingsley at gmail.com> wrote:

> On Sat, Feb 28, 2009 at 7:55 PM, Tim M <a at b.com> wrote:
>>
>> Who's idea was the vectorization? Seems very usefull but not sure if  
>> really
>> like the syntax. Wouldn't it be simpler to have unordered attribute for  
>> all
>> kinds loops that the compiler can use?
>>
>
> D already has some simple vectorization features:
>
> int[] a = [1, 2, 3, 4, 5];
> auto b = a[] + 5; // [6, 7, 8, 9, 10]
> auto c = a + b; // [7, 9, 11, 13, 15]

I have no problems with that code there.

http://all-technology.com/eigenpolls/dwishlist/index.php?it=10

Through out that page it shows examples of iterations where order is not  
actually defined, the index has to modify by one but it gives the compiler  
the ability to create a few threads and execute in parallel. Thats what I  
was actually talking about. I would hate for that code to be valid and  
would prefer to use the usual while, do while, for and foreach loops but  
have an attribute to enable optimization eg:


unordered for(i = 0; i < 10; ++i)
{
    //anything here is independant of the previous iterations
    //and I dont care if compiler splits accross cpu cores
}

Anyway I still think there is of low priority over other things like cent  
data type but it is rated rather high.



More information about the Digitalmars-d mailing list