Function mgb::MGB_DEF_ENUM_CLASS_BIT_OPR

Function Documentation

mgb::MGB_DEF_ENUM_CLASS_BIT_OPR (CompNode::Flag) class CompNodeSeqRecorder

record computation operations on a computing node

This is used for fast execution of an identical computation sequence where only input/output data differ.

When this object is created from a comp node, recording starts immediately. Call stop() when computation finishes, and call replay() when it needs to be re-executed.

Implementations should consider thread safe in comp_node, in order to support multi threads reording in the same comp_node simultaneously, using thread local recorder in comp_node.

Note. When recording is over, the recorder is independent with comp_node, so the task dispatched into recorder should not related to the comp_node methord, and the thread of recorder replay is the user thread.