#NEWLINE# def test_no_arg_barrier_support( self ) : #NEWLINE# #INDENT# @ hsa . jit ( 'void(float32[::1])' ) #NEWLINE# def twice( A ) : #NEWLINE# #INDENT# i = hsa . get_global_id ( 0 ) #NEWLINE# d = A [ i ] #NEWLINE# hsa . barrier ( ) #NEWLINE# A [ i ] = ( d * 2 ) #NEWLINE# #UNINDENT# N = 256 #NEWLINE# arr = np . random . random ( N ) . astype ( np . float32 ) #NEWLINE# orig = arr . copy ( ) #NEWLINE# twice [ ( 2 , 128 ) ] ( N ) #NEWLINE# self . assertIn ( 'barrier;' , twice . assembly ) #NEWLINE# np . testing . assert_allclose ( ( orig * 2 ) , arr )