- DiracDelta.make_thunk(node, storage_map, compute_map, no_recycling, impl=None)#
Create a thunk.
This function must return a thunk, that is a zero-arguments function that encapsulates the computation to be performed by this op on the arguments of the node.
Apply) – Something previously returned by
bool]]) – A
Variables to single-element lists where a boolean value can be found. The boolean indicates whether the
storage_mapcontainer contains a valid value (i.e.
True) or whether it has not been computed yet (i.e.
impl (str) – Description for the type of node created (e.g.
If the thunk consults the
storage_mapon every call, it is safe for it to ignore the
no_recyclingargument, because elements of the
no_recyclinglist will have a value of
storage_map. If the thunk can potentially cache return values (like
CLinkerdoes), then it must not do so for variables in the
Op.prepare_nodeis always called. If it tries
'c'and it fails, then it tries
Op.prepare_nodewill be called twice.
- Return type