aeppl.scan.MeasurableScan.make_thunk#

MeasurableScan.make_thunk(node, storage_map, compute_map, no_recycling, impl=None)#
Parameters
  • node – Something previously returned by self.make_node.

  • storage_map – dict variable -> one-element-list where a computed value for this variable may be found.

  • compute_map – dict variable -> one-element-list where a boolean value will be found. The boolean indicates whether the variable’s storage_map container contains a valid value (True) or if it has not been computed yet (False).

  • no_recycling – List of variables for which it is forbidden to reuse memory allocated by a previous call.

  • impl – Use ‘py’ if we want python execution.

Notes

If the thunk consults the storage_map on every call, it is safe for it to ignore the no_recycling argument, because elements of the no_recycling list will have a value of None in the storage map. If the thunk can potentially cache return values (like CLinker does), then it must not do so for variables in the no_recycling list.