Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile errors when instantiating OpenCLVector<T> #1250

Open
N-Dekker opened this issue Oct 1, 2024 · 0 comments
Open

Compile errors when instantiating OpenCLVector<T> #1250

N-Dekker opened this issue Oct 1, 2024 · 0 comments

Comments

@N-Dekker
Copy link
Member

N-Dekker commented Oct 1, 2024

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:

const_cast<OpenCLVector<T> *>(this)->map();

this->Write(data.GetDataPointer(), data.GetLength(), offset);

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...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant