These are chat archives for libmir/public

30th
Mar 2017
Ilya
@9il
Mar 30 2017 05:40
@prasunanand GLAS is 2 x slower with LLVM 4.0. Probably you need to use LDC based on LLVM 3.9
libmir/mir-glas#18
Ilya
@9il
Mar 30 2017 05:55
Mir random v0.2.x was released. Random ndslice generation was added.
import mir.ndslice: slicedField, slice;
import mir.random;
import mir.random.variable: NormalVariable;
import mir.random.algorithm: field;

auto var = NormalVariable!double(0, 1);
auto rng = Random(unpredictableSeed);
auto sample = rng      // passed by reference
    .field(var)        // construct random field from standard normal distribution
    .slicedField(5, 3) // construct random matrix 5 row x 3 col (lazy, without allocation)
    .slice;            // allocates data of random matrix

import std.stdio;
writeln(sample);