Scanner C++ API
|
Interface for reading data in a computation graph. More...
#include <source.h>
Public Member Functions | |
Source (const SourceConfig &config) | |
virtual void | validate (proto::Result *result) |
Checks if Source arguments are valid. More... | |
virtual void | read (const std::vector< ElementArgs > &args, BatchedElements &output_columns)=0 |
Runs the Source to generate input elements. More... | |
virtual void | set_profiler (Profiler *profiler) |
For internal use. | |
Public Attributes | |
Profiler * | profiler_ = nullptr |
Interface for reading data in a computation graph.
Sources are how Scanner's computation graphs read data from outside the system.
|
pure virtual |
Runs the Source to generate input elements.
args | vector of ElementArgs produced by an Enumerator, where each ElementArgs describes which elements to read. |
output_columns | source output, vector of elements, where each element was produced using the provided ElementArgs |
Number of output columns must be non-zero.
|
inlinevirtual |
Profiler* scanner::Source::profiler_ = nullptr |
The profiler allows an op to save profiling data for later visualization. It is not guaranteed to be non-null, so check before use.