UoB-HPC / BabelStream

STREAM, for lots of devices written in many programming models
Other
323 stars 110 forks source link

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

Closed tom91136 closed 1 year ago

tom91136 commented 2 years ago

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; }