BabelStream icon indicating copy to clipboard operation
BabelStream copied to clipboard

NVHPC needs the `+=` operator to be implemented for std-indices on stdpar=multicore

Open tom91136 opened this issue 2 years ago • 0 comments

So it appears that instead of calling ++ or separate + and = like in libstdc++ and -stdpar=gpu, -stdpar=multicore calls +=.

"/lustre/home/br-wlin/nvhpc_sdk/Linux_x86_64/22.1/compilers/include-stdpar/thrust/system/detail/generic/advance.inl", line 48: error: no operator "+=" matches these operands                                             
            operand types are: ranged<int>::iterator += int
    i += n;

Possible solution:

 iterator operator+=(int x) { iterator retval = *this; (*this).num+=x; return retval; }

tom91136 avatar Mar 15 '22 18:03 tom91136