Using mir to work with matrices

drug drug2004 at bk.ru
Mon Feb 1 08:11:55 UTC 2021


On 1/29/21 8:20 PM, 9il wrote:
> On Friday, 29 January 2021 at 15:35:49 UTC, drug wrote:
>> Between is there a plan to implement some sort of static slice where 
>> the lengths of the dimensions are known in compile time? Compiler help 
>> is very useful.
> 
> No. BLAS/LAPACK API's can't use compile-time information. User matrix 

I see

> loops can be optimized by the compiler using constants and without 
> introducing new types. If you need a stack-allocated matrix, then a 1D 
> stack-allocated array can be used >
> import mir.slice.slice;
> 
> double[12] payload;
> auto matrix = payload[].sliced(3, 4);
> 

Yes, it's how I did it.


More information about the Digitalmars-d-learn mailing list