Good dotProduct

bearophile bearophileHUGS at lycos.com
Tue Jun 29 10:18:40 PDT 2010


There is one more thing that I have forgotten. If you have code like:

void main() {
    double[8] a = 0.5;
    double[8] b = 2.0;    
    double r = dot5(a, b);
}

then you can't be sure that 'a' and 'b' are aligned to 16 bytes (I hope they are aligned to 8).

Time ago I have suggested the simple syntax:
align(16) double[8] b = 2.0;    

but things are not so easy:
http://d.puremagic.com/issues/show_bug.cgi?id=2278

Bye,
bearophile


More information about the Digitalmars-d mailing list