elastix
elastix copied to clipboard
Compile errors when instantiating `OpenCLVector<T>`
trafficstars
An attempt to instantiate OpenCLVector<T> for a specific template argument T triggers compile errors. For example:
// Template instantiation for T = float.
template class itk::OpenCLVector<float>;
VS2022 output:
ITKimprovements\itkOpenCLVector.hxx(100,42): error C2039: 'map': is not a member of 'itk::OpenCLVector<float>'
ITKimprovements\itkOpenCLVector.hxx(137,43): error C2039: 'GetLength': is not a member of 'itk::Vector<float,3>'
Affected lines of code:
https://github.com/SuperElastix/elastix/blob/0852e7a4db5281f1be67f88163e66d350e1590c7/Common/OpenCL/ITKimprovements/itkOpenCLVector.hxx#L100
https://github.com/SuperElastix/elastix/blob/0852e7a4db5281f1be67f88163e66d350e1590c7/Common/OpenCL/ITKimprovements/itkOpenCLVector.hxx#L137
I guess these errors can be fixed easily. But are the affected member functions operator[] and Write) really necessary? Or can they simply be removed?
@dpshamonin Denis, do you still remember...?