OpenCL-CLHPP icon indicating copy to clipboard operation
OpenCL-CLHPP copied to clipboard

Device to host cl::copy in cl2.hpp is not MSVC checked iterator friendly

Open MathiasMagnus opened this issue 6 years ago • 1 comments

Currently, only the host to device cl::copy is MSVC checked iterator friendly. Please add the same addition to Device to host as well.

MathiasMagnus avatar Jun 12 '18 10:06 MathiasMagnus

Host to Device copy has:

#if defined(_MSC_VER)
    std::copy(
        startIterator, 
        endIterator, 
        stdext::checked_array_iterator<DataType*>(
            pointer, length));
#else
    std::copy(startIterator, endIterator, pointer);
#endif

Device to Host copy currently only has:

    std::copy(pointer, pointer + length, startIterator);

bashbaug avatar Jun 05 '23 22:06 bashbaug