9il on v3.2.3
9il on master
get rid of deprecation messages (compare)
9il on master
fixup series (compare)
9il on master
Replace deprecated `do` keyword… (compare)
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);
*._lengths
parameter is public and accessible. Please fill issue if it does not. _lengths.length
can be used instead of N. *._lengths
are mutable. http://docs.algorithm.dlang.io/latest/mir_ndslice_slice.html#.Slice._lengths*.shape
, and *.shape.length
, http://docs.algorithm.dlang.io/latest/mir_ndslice_slice.html#.Slice.shapeisSlice!T[0]
returns the same value as *.shape.length
. http://docs.algorithm.dlang.io/latest/mir_ndslice_slice.html#.isSlicemir.ndslice
, I was going to port a simple lattice Boltzmann fluid dynamics simulation for learning purposes, starting with a collision kernel:auto uxv = ux[i];
ldmd2 -inline -O -enable-cross-module-inlining -release -boundscheck=off -I mir-algorithm/source/ -output-s matrix_copy.d
ldc2 --version
LDC - the LLVM D compiler (1.3.0git-a969bcf):
based on DMD v2.073.2 and LLVM 4.0.0
built with LDC - the LLVM D compiler (0.17.5git-64a274a)
Default target: x86_64-apple-darwin16.5.0
Host CPU: haswell
http://dlang.org - http://wiki.dlang.org/LDC