#NEWLINE# def update_profile( self , profile ) : #NEWLINE# #INDENT# for ( node , thunk , t , c ) in zip ( self . nodes , self . thunks , self . call_times , self . call_counts ) : #NEWLINE# #INDENT# profile . apply_time . setdefault ( node , 0.0 ) #NEWLINE# profile . apply_time [ node ] += t #NEWLINE# profile . apply_callcount . setdefault ( node , 0 ) #NEWLINE# profile . apply_callcount [ node ] += c #NEWLINE# profile . apply_cimpl [ node ] = hasattr ( thunk , 'cthunk' ) #NEWLINE# #UNINDENT# if hasattr ( self , 'variable_shape' ) : #NEWLINE# #INDENT# profile . variable_shape = self . variable_shape . copy ( ) #NEWLINE# profile . variable_strides = self . variable_strides . copy ( ) #NEWLINE# #UNINDENT# if hasattr ( self , 'node_executed_order' ) : #NEWLINE# #INDENT# profile . node_executed_order = self . node_executed_order [ : ] #NEWLINE# #UNINDENT# if hasattr ( self , 'node_cleared_order' ) : #NEWLINE# #INDENT# profile . node_cleared_order = self . node_cleared_order [ : ] #NEWLINE# #UNINDENT# if hasattr ( self , 'dependencies' ) : #NEWLINE# #INDENT# profile . dependencies = self . dependencies #NEWLINE# #UNINDENT# for i in xrange ( len ( self . call_times ) ) : #NEWLINE# #INDENT# self . call_times [ i ] = 0.0 #NEWLINE# self . call_counts [ i ] = 0