CIL icon indicating copy to clipboard operation
CIL copied to clipboard

Cupy array

Open paskino opened this issue 3 years ago • 1 comments

Enables a cupy backend for the array wrapped in the DataContainer.

Updates code and unit tests accordingly.

paskino avatar Jan 20 '22 09:01 paskino

I have avoided to add the backend into the geometry, because it is not really where it belongs. However when methods such as allocate is called, one needs to specify the backend required.

For instance, most operators will internally allocate some datacontainer using the default allocate call, which defaults to the numpy backend. This means that one needs to add an additional member backend to the operator, so that the call to allocate can have a non default choice of backend.

Conversely, if we specify the backend in the geometry, it would be possible to not be forced to add the backend into any operator/function because it could be determined by checking both the geometry and the actual data array.

paskino avatar Jan 20 '22 21:01 paskino