#NEWLINE# def test_record_alignment( self ) : #NEWLINE# #INDENT# rec_dtype = np . dtype ( [ ( 'a' , 'int32' ) , ( 'b' , 'float64' ) ] , align = True ) #NEWLINE# rec = from_dtype ( rec_dtype ) #NEWLINE# @ cuda . jit ( ( rec [ : ] , ) ) #NEWLINE# def foo( a ) : #NEWLINE# #INDENT# i = cuda . grid ( 1 ) #NEWLINE# a [ i ] . a = a [ i ] . b #NEWLINE# #UNINDENT# a_recarray = np . recarray ( 3 , dtype = rec_dtype ) #NEWLINE# for i in range ( a_recarray . size ) : #NEWLINE# #INDENT# a_rec = a_recarray [ i ] #NEWLINE# a_rec . a = 0 #NEWLINE# a_rec . b = ( ( i + 1 ) * 123 ) #NEWLINE# #UNINDENT# foo [ ( 1 , 3 ) ] ( a_recarray ) #NEWLINE# self . assertTrue ( np . all ( ( a_rec . a == a_recarray . b ) ) )