1#ifndef TMVA_SOFIE_ROPERATOR_Tile 
    2#define TMVA_SOFIE_ROPERATOR_Tile 
   11namespace Experimental{
 
   41      for(
size_t i=0; i < 
input[1].size(); i++) {
 
 
   50        throw std::runtime_error(
"TMVA SOFIE Tile Op Input Tensor is not found in model");
 
   53        throw std::runtime_error(
"TMVA SOFIE Tile Op Input Tensor is not found in model");
 
   60         throw std::runtime_error(
"TMVA SOFIE Tile Op: non-initialized repeats input is not supported");
 
   68        throw std::runtime_error(
"Failed to retrieve the data for the repeats tensor.");
 
   74         throw std::runtime_error(
"Repeats tensor is not 1D.");
 
 
   94            throw std::runtime_error(
"TMVA SOFIE Tile Op called to Generate without being initialized first");
 
  101      std::stringstream out;
 
  104      out << 
"///-------- Tile operator\n";
 
  109      out << 
"int s = 1;\n";
 
  111      out << 
"for (int i = " << 
fShapeInput.size()-1 << 
"; i >=0; i--) {\n";
 
  112      out << 
SP << 
"int r = tensor_" << 
fNRepeats << 
"[i];\n";
 
  115      out << 
SP << 
"int i_offset = 0, o_offset = 0;\n";
 
  116      out << 
SP << 
"s = s * input_shape[i];\n";
 
  119      out << 
SP << 
SP <<  
"for (int j = 0; j < inputLength/s ; j++) {\n";
 
  120      out << 
SP << 
SP << 
SP << 
"for (int k = 0; k < r ; k++) {\n";
 
  121      out << 
SP << 
SP << 
SP << 
SP << 
"std::copy(" << 
input << 
"+ i_offset, " 
  122                                    << 
input << 
"+ i_offset + s, " << 
output << 
"+ o_offset);\n";
 
  123      out << 
SP << 
SP << 
SP << 
SP << 
"o_offset += s;\n";
 
  124      out << 
SP << 
SP << 
SP << 
"}\n"; 
 
  125      out << 
SP << 
SP << 
SP << 
"i_offset += s;\n";
 
  126      out << 
SP << 
SP << 
"}\n"; 
 
  127      out << 
SP << 
"} else {\n";  
 
  129      out << 
SP << 
SP << 
"for (int j = inputLength/s - 1 ; j>=0; j--) {\n";
 
  130      out << 
SP << 
SP << 
SP << 
"o_offset = j*s*r;\n";
 
  131      out << 
SP << 
SP << 
SP << 
"i_offset = j*s;\n";
 
  132      out << 
SP << 
SP << 
SP << 
"for (int k = 0; k < r ; k++) {\n";
 
  133      out << 
SP << 
SP << 
SP << 
SP << 
"std::copy(" << 
output << 
"+ i_offset, " 
  134                                    << 
output << 
"+ i_offset + s, " << 
output << 
"+ o_offset);\n";
 
  135      out << 
SP << 
SP << 
SP << 
SP << 
"o_offset += s;\n";
 
  136      out << 
SP << 
SP << 
SP << 
"}\n"; 
 
  137      out << 
SP << 
SP << 
"}\n"; 
 
  139      out << 
SP << 
"s *= r;\n";
 
  140      out << 
SP << 
"inputLength *= r;\n";
 
 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
 
const_iterator begin() const
 
void AddIntermediateTensor(std::string tensor_name, ETensorType type, std::vector< Dim > dim_shape)
 
bool CheckIfTensorAlreadyExist(std::string tensor_name)
 
const ETensorType & GetTensorType(std::string name) const
 
bool IsInitializedTensor(const std::string &name) const
 
const std::vector< size_t > & GetTensorShape(std::string name) const
 
std::shared_ptr< void > GetInitializedTensorData(std::string tensor_name)
 
ROperator_Tile(std::string nameRepeat, std::string nameInput, std::string nameY)
 
std::vector< ETensorType > TypeInference(std::vector< ETensorType > input) override
 
std::vector< size_t > fShapeY
 
std::vector< size_t > fShapeInput
 
std::vector< std::vector< size_t > > ShapeInference(std::vector< std::vector< size_t > > input) override
 
std::string Generate(std::string OpName) override
 
void Initialize(RModel &model) override
 
std::vector< std::string_view > fInputTensorNames
 
const std::string SP
space used to correctly indent the generated C++ code
 
std::vector< std::string_view > fOutputTensorNames
 
std::string ConvertShapeToString(std::vector< size_t > shape)
 
std::size_t ConvertShapeToLength(std::vector< size_t > shape)
 
create variable transformations