#NEWLINE# def test_host_alloc_pinned( self ) : #NEWLINE# #INDENT# ary = cuda . pinned_array ( 10 , dtype = np . uint32 ) #NEWLINE# ary . fill ( 123 ) #NEWLINE# self . assertTrue ( all ( ( ary == 123 ) ) ) #NEWLINE# devary = cuda . to_device ( ary ) #NEWLINE# driver . device_memset ( devary , 0 , driver . device_memory_size ( devary ) ) #NEWLINE# self . assertTrue ( all ( ( ary == 123 ) ) ) #NEWLINE# devary . copy_to_host ( ary ) #NEWLINE# self . assertTrue ( all ( ( ary == 0 ) ) )