BabelStream
BabelStream copied to clipboard
NVHPC needs the `+=` operator to be implemented for std-indices on stdpar=multicore
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; }