Scanner C++ API
|
Public Member Functions | |
SampleKernel (const KernelConfig &config, const std::string &kernel_str, const std::string &pickled_config) | |
void | execute (const BatchedElements &input_columns, BatchedElements &output_columns) override |
Runs the op on input elements and produces equal number of output elements. More... | |
SampleKernel (const KernelConfig &config) | |
void | execute (const BatchedElements &input_columns, BatchedElements &output_columns) override |
Runs the op on input elements and produces equal number of output elements. More... | |
Public Member Functions inherited from scanner::BatchedKernel | |
BatchedKernel (const KernelConfig &config) | |
virtual void | execute_kernel (const StenciledBatchedElements &input_columns, BatchedElements &output_columns) |
For internal use. | |
Public Member Functions inherited from scanner::BaseKernel | |
BaseKernel (const KernelConfig &config) | |
virtual void | validate (proto::Result *result) |
Checks if kernel arguments are valid. More... | |
virtual void | fetch_resources (proto::Result *result) |
Downloads any resources necessary for the kernel to run. More... | |
virtual void | setup_with_resources (proto::Result *result) |
Runs any setup code that relies on fetched resources. More... | |
virtual void | new_stream (const std::vector< u8 > &args) |
Called when the Kernel is about to process a new stream. More... | |
virtual void | reset () |
Requests that kernel resets its logical state. More... | |
virtual void | set_profiler (Profiler *profiler) |
For internal use. | |
Public Member Functions inherited from scanner::Kernel | |
Kernel (const KernelConfig &config) | |
virtual void | execute_kernel (const StenciledBatchedElements &input_columns, BatchedElements &output_columns) |
For internal use. | |
Additional Inherited Members | |
Public Attributes inherited from scanner::BaseKernel | |
Profiler * | profiler_ = nullptr |
Static Public Attributes inherited from scanner::BaseKernel | |
static const i32 | UnlimitedDevices = 0 |
Protected Member Functions inherited from scanner::Kernel | |
virtual void | execute (const Elements &input_columns, Elements &output_columns)=0 |
Runs the op on input elements and produces equal number of output elements. More... | |
|
inlineoverridevirtual |
Runs the op on input elements and produces equal number of output elements.
input_columns | vector of columns, where each column is a vector of inputs and each input is a byte array |
output_columns | op output, each column must have same length as the number of input elements |
Evaluate gets run on batches of inputs. At the beginning of a pipeline this is raw RGB images from the input images/videos, and after that the input becomes whatever was returned by the previous op.
Number of output columns must be non-zero.
Implements scanner::BatchedKernel.
|
overridevirtual |
Runs the op on input elements and produces equal number of output elements.
input_columns | vector of columns, where each column is a vector of inputs and each input is a byte array |
output_columns | op output, each column must have same length as the number of input elements |
Evaluate gets run on batches of inputs. At the beginning of a pipeline this is raw RGB images from the input images/videos, and after that the input becomes whatever was returned by the previous op.
Number of output columns must be non-zero.
Implements scanner::BatchedKernel.