This will be a class to be inherited by SPNG Nodes. It can serve several purposes
- Determining if the necessary TorchTensors exist within the input TorchTensorSet
- Stripping away any irrelevant TorchTensors within the input
- Batching/unsqueezing the TorchTensors if necessary
- Communicating with the Device interface
- Communicating with the Semaphore
class ISPNGNode:
virtual bool operator()(const input_pointer& in, output_pointer& out) final;
virtual bool execute()(const input_pointer& in, output_pointer & out) = 0; //Pure virtual -- must be implemented by concrete class
...
bool operator()(const input_pointer& in, output_pointer& out) {
...common_operations...
execute(...)
...common_operations...
}