Ada to D - an array for storing values of each of the six bits which are sufficient

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 1 05:06:57 PDT 2015


Dennis Ritchie:

> Anybody can write a packed array on the D? I once badly 
> represent the means by which we can write a packed array. Maybe 
> for this you should use core.simd or unions?

SIMD could be useful for some fancy bulk operations. But you 
should be able to write a good basic packed array without SIMD, 
perhaps about as nice as the Ada ones (D sometimes offers good 
enough tools to build what you need).

Posible use:

PackedDynamicArray!6 pa; // On heap.
PackedFixedArray!(6, 300) pfa; // On stack.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list