alpaka-group / alpaka

Abstraction Library for Parallel Kernel Acceleration :llama:
https://alpaka.readthedocs.io
Mozilla Public License 2.0
353 stars 72 forks source link

An example using MdSpan to pass 2D data #2293

Closed mehmetyusufoglu closed 3 months ago

mehmetyusufoglu commented 3 months ago

A new example is prepared by converting Convolution2D example. conv2DWithMdspan example.

Uses mdspan data structure for input matrix, input filter matrix and output matrix. Hence pitch values are not needed to be used. Cleaner than the other version.

fwyzard commented 3 months ago

Looks good to me, though I've never used mdspan yet, so I may be missing something.

SimeonEhrig commented 3 months ago

Looks good to me, though I've never used mdspan yet, so I may be missing something.

The usage of mdspan looks fine for me. At least, this is how I use it.