#NEWLINE# def test_cublasSrot( self ) : #NEWLINE# #INDENT# x = np . array ( [ 1 , 2 , 3 ] ) . astype ( np . float32 ) #NEWLINE# y = np . array ( [ 4 , 5 , 6 ] ) . astype ( np . float32 ) #NEWLINE# s = 2.0 #NEWLINE# c = 3.0 #NEWLINE# x_gpu = gpuarray . to_gpu ( x ) #NEWLINE# y_gpu = gpuarray . to_gpu ( x ) #NEWLINE# cublas . cublasSrot ( self . cublas_handle , x_gpu . size , x_gpu . gpudata , 1 , y_gpu . gpudata , 1 , c , s ) #NEWLINE# assert np . allclose ( x_gpu . get ( ) , [ 5 , 10 , 15 ] ) #NEWLINE# assert np . allclose ( y_gpu . get ( ) , [ 1 , 2 , 3 ] )