www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - ndslice v2 is coming soon

reply 9il <ilyayaroshenko gmail.com> writes:
Hi,

PR: https://github.com/libmir/mir-algorithm/pull/143

Features
=======

  * Slice and Series are C++ ABI compatible without additional 
wrappers.
   See example: 
https://github.com/libmir/mir-algorithm/tree/devel/cpp_example

  * Intuitive API with default params and without explicit 
dimension packs
  ```
    alias Slice = mir_slice;
    struct mir_slice(Iterator, size_t N = 1, SliceKind kind = 
Contiguous)
```
  For example, double[] analog is just Slice!(double*) / 
mir_slice<double*>.

Best,
Ilya Yaroshenko
Jul 28 2018
parent jmh530 <john.michael.hall gmail.com> writes:
On Sunday, 29 July 2018 at 06:17:29 UTC, 9il wrote:
 Hi,

 PR: https://github.com/libmir/mir-algorithm/pull/143

 Features
 =======

  * Slice and Series are C++ ABI compatible without additional 
 wrappers.
   See example: 
 https://github.com/libmir/mir-algorithm/tree/devel/cpp_example

  * Intuitive API with default params and without explicit 
 dimension packs
  ```
    alias Slice = mir_slice;
    struct mir_slice(Iterator, size_t N = 1, SliceKind kind = 
 Contiguous)
 ```
  For example, double[] analog is just Slice!(double*) / 
 mir_slice<double*>.

 Best,
 Ilya Yaroshenko
This might break some stuff in numir that depends on the current behavior, but certainly looks interesting. I haven't had a chance to go through everything as that's a big PR.
Jul 30 2018