Skip to content

Use Tensor for (tiled) grid member in CUDA proxies

Bram Veenboer requested to merge xtensor-refactor-6 into master

The CUDA proxy used a cu::Unified member to store a copied of the grid. This member was used both for the Generic and the Unified proxy, denoting either a copy of the grid, or a tiled version of the grid. This made the code somewhat hard to comprehend and requires temporary aocommon::xt::Span's for interoperability and is now solved by introducing two new member variables: unified_grid_ in CUDA and unified_grid_ in Unified. By using Tensor objects and getter functions, the code has become considerably simpler.

The cu::UnifiedMemory class is no longer used in the interface of InstanceCUDA. It is up to the proxy to provide a valid pointer. The launch_grid_fft_unified method was no longer used (it was added as an experiment), and therefore removed rather than updated to also accept a normal pointer for the grid.

Edited by Bram Veenboer

Merge request reports

Loading