#NEWLINE# def test_cublasCdotc( self ) : #NEWLINE# #INDENT# x = ( np . random . rand ( 5 ) + ( 1j * np . random . rand ( 5 ) ) ) . astype ( np . complex64 ) #NEWLINE# x_gpu = gpuarray . to_gpu ( x ) #NEWLINE# y = ( np . random . rand ( 5 ) + ( 1j * np . random . rand ( 5 ) ) ) . astype ( np . complex64 ) #NEWLINE# y_gpu = gpuarray . to_gpu ( y ) #NEWLINE# result = cublas . cublasCdotc ( self . cublas_handle , x_gpu . size , x_gpu . gpudata , 1 , y_gpu . gpudata , 1 ) #NEWLINE# assert np . allclose ( result , np . dot ( np . conj ( x ) , y ) )