This SIMD code compiles, but it's not handy: import core.simd; void main() { enum U = ubyte.max; ubyte16 m = [U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U]; } So maybe it's worth adding the ".max" and ".min" attributes to simd registers, to allow: import core.simd; void main() { auto a = ubyte16.max; // All initialized to ubyte.max. auto b = int4.min; // All initizialized to int.min. } This also allows to write simd code that looks more like regular code.
You can do things like: ubyte16 a = ubyte.max; as broadcasting works.
@WalterBright created dlang/dmd pull request #12045 "fix Issue 10445 - add .min, .max, etc. properties for vector types" fixing this issue: - fix Issue 10445 - add .min, .max, etc. properties for vector types https://github.com/dlang/dmd/pull/12045
@WalterBright created dlang/dlang.org pull request #2922 "fix Issue 10445 - add .min, .max, etc. properties for vector types" fixing this issue: - fix Issue 10445 - add .min, .max, etc. properties for vector types https://github.com/dlang/dlang.org/pull/2922
dlang/dmd pull request #12045 "fix Issue 10445 - add .min, .max, etc. properties for vector types" was merged into master: - ff88025b51b8074f930295f4a735b76af554e973 by Walter Bright: fix Issue 10445 - add .min, .max, etc. properties for vector types https://github.com/dlang/dmd/pull/12045
dlang/dlang.org pull request #2922 "fix Issue 10445 - add .min, .max, etc. properties for vector types" was merged into master: - 40e9255d5be18f984b042c389657c4422244c88f by Walter Bright: fix Issue 10445 - add .min, .max, etc. properties for vector types https://github.com/dlang/dlang.org/pull/2922