ArmNN
 21.11
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 38 of file SerializeLayerParameters.hpp.

Member Function Documentation

◆ Serialize()

void Serialize ( ParameterStringifyFunction fn,
const BatchToSpaceNdDescriptor desc 
)
static

Definition at line 29 of file SerializeLayerParameters.cpp.

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

31 {
32  {
33  std::stringstream ss;
34  int count = 0;
35  for (auto&& var : desc.m_BlockShape)
36  {
37  if (count > 0)
38  {
39  ss << ",";
40  }
41  ss << var;
42  ++count;
43  }
44  fn("BlockShape", ss.str());
45  }
46 
47  {
48  std::stringstream ss;
49  int count = 0;
50  for (auto&& var : desc.m_Crops)
51  {
52  if (count > 0)
53  {
54  ss << ",";
55  }
56  ss << "[" << var.first << "," << var.second << "]";
57  ++count;
58  }
59  fn("Crops", ss.str());
60  }
61 
62  fn("DataLayout", GetDataLayoutName(desc.m_DataLayout));
63 }
constexpr const char * GetDataLayoutName(DataLayout dataLayout)
Definition: TypesUtils.hpp:222

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