dash
dash copied to clipboard
NumDimensions, alternative way to the template parameter
Hi, Sorry for too many questions here. I am developing a DASH plugin to ArrayUDF and had a question about the NumDimensions. It is a template parameter to the Matrix class (as below). Do we have another way to bypass this it? Say, I declare a Matrix first and then pass the NumDimensions as a parameter. I am asking because using DASH to be as a storage layer needs to be generic pointer to a matrix with any dimension. But, this NumDimensions template parameter introduces lots of duplicated code.
template<typename ElementT, dim_t NumDimensions, typename IndexT = dash::default_index_t, class PatternT = TilePattern<NumDimensions, ROW_MAJOR, IndexT>, typename LocalMemSpaceT = HostSpace>
class dash::Matrix< ElementT, NumDimensions, IndexT, PatternT, LocalMemSpaceT >
From: https://codedocs.xyz/dash-project/dash/a01398.html