#NEWLINE# def perform( self , node , inputs , outs , ctx ) : #NEWLINE# #INDENT# ( out , ) = outs #NEWLINE# v = inputs [ 0 ] #NEWLINE# sh = tuple ( map ( int , self [ 1 : ] ) ) #NEWLINE# if ( ( out [ 0 ] is None ) or ( out [ 0 ] . shape != sh ) ) : #NEWLINE# #INDENT# if self . memset_0 : #NEWLINE# #INDENT# out [ 0 ] = gpuarray . zeros ( sh , dtype = v . dtype , context = ctx ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# out [ 0 ] = gpuarray . empty ( sh , dtype = v . dtype , context = ctx ) #NEWLINE# out [ 0 ] [ ... ] = v #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# out [ 0 ] [ ... ] = v #NEWLINE# #UNINDENT# if config . gpuarray . sync : #NEWLINE# #INDENT# out [ 0 ] . sync ( )