ArmNN
 21.02
StringifyLayerParameters< BatchToSpaceNdDescriptor > Struct Template Reference

#include <SerializeLayerParameters.hpp>

Static Public Member Functions

static void Serialize (ParameterStringifyFunction &fn, const BatchToSpaceNdDescriptor &desc)
 

Detailed Description

template<>
struct armnn::StringifyLayerParameters< BatchToSpaceNdDescriptor >

Definition at line 98 of file SerializeLayerParameters.hpp.

Member Function Documentation

◆ Serialize()

void Serialize ( ParameterStringifyFunction fn,
const BatchToSpaceNdDescriptor desc 
)
static

Definition at line 247 of file SerializeLayerParameters.cpp.

References armnn::GetDataLayoutName(), BatchToSpaceNdDescriptor::m_BlockShape, BatchToSpaceNdDescriptor::m_Crops, and BatchToSpaceNdDescriptor::m_DataLayout.

249 {
250  {
251  std::stringstream ss;
252  int count = 0;
253  for (auto&& var : desc.m_BlockShape)
254  {
255  if (count > 0)
256  {
257  ss << ",";
258  }
259  ss << var;
260  ++count;
261  }
262  fn("BlockShape", ss.str());
263  }
264 
265  {
266  std::stringstream ss;
267  int count = 0;
268  for (auto&& var : desc.m_Crops)
269  {
270  if (count > 0)
271  {
272  ss << ",";
273  }
274  ss << "[" << var.first << "," << var.second << "]";
275  ++count;
276  }
277  fn("Crops", ss.str());
278  }
279 
280  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
281 }
constexpr const char * GetDataLayoutName(DataLayout dataLayout)
Definition: TypesUtils.hpp:203

The documentation for this struct was generated from the following files: