https://issues.dlang.org/show_bug.cgi?id=16537

Илья Ярошенко <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Илья Ярошенко <[email protected]> ---
I don't think that the problem with `in` can be solved for D2. This can be used
instead:

alias MyMatrix = Slice!(2,double*);
alias MyConstMatrix = Slice!(2, const(double)*); // should be casted in caller
function

A DIP [2] can be created to allow implicit converting MyMatrix ->
MyConstMatrix.

--- 

BTW, mir.ndslice.algorithm [1] allows to optimise you function few times. Also
http://docs.mir.dlang.io/latest/mir_ndslice_slice.html#.uninitializedSlice will
help optimization too. mir.ndslice should be used instead of std ndslice (it
should be unified soon). Comparing with fortran ndslice indexed loops can not
be vectorized, ndslice.algorithm solve this problem.

Mir requires recent LDC beta. DMD is not supported.
ldmd2 (shell on top of ldc2) should be used instead of ldc2, because dub passes
wrong optimization params to ldc2.

[1] http://docs.mir.dlang.io/latest/mir_ndslice_algorithm.html
[2] https://github.com/dlang/DIPs

--

Reply via email to