#NEWLINE# def test_onecolor_rw( self , backend , iterset , x , iterset2indset ) : #NEWLINE# #INDENT# 'Increment each value of a Dat by one with op2.RW.' #NEWLINE# kernel_rw = 'void kernel_rw(unsigned int* x) { (*x) = (*x) + 1; }\n' #NEWLINE# op2 . par_loop ( op2 . Kernel ( kernel_rw , 'kernel_rw' ) , iterset , x ( op2 . RW , iterset2indset [ 0 ] ) ) #NEWLINE# assert ( sum ( x . data ) == ( ( nelems * ( nelems + 1 ) ) / 2 ) )