Scanner C++ API
Public Member Functions | Public Attributes | List of all members
scanner::Source Class Referenceabstract

Interface for reading data in a computation graph. More...

#include <source.h>

Inheritance diagram for scanner::Source:
scanner::internal::ColumnSource

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

Profilerprofiler_ = nullptr
 

Detailed Description

Interface for reading data in a computation graph.

Sources are how Scanner's computation graphs read data from outside the system.

Member Function Documentation

virtual void scanner::Source::read ( const std::vector< ElementArgs > &  args,
BatchedElements &  output_columns 
)
pure virtual

Runs the Source to generate input elements.

Parameters
argsvector of ElementArgs produced by an Enumerator, where each ElementArgs describes which elements to read.
output_columnssource output, vector of elements, where each element was produced using the provided ElementArgs

Number of output columns must be non-zero.

virtual void scanner::Source::validate ( proto::Result *  result)
inlinevirtual

Checks if Source arguments are valid.

Only useful if your Source has its own custom Protobuf arguments.

Member Data Documentation

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.


The documentation for this class was generated from the following file: