Skip to content

Compile errors when instantiating OpenCLVector<T> #1250

@N-Dekker

Description

@N-Dekker

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions