ArmNN
 21.05
StringifyLayerParameters< ViewsDescriptor > Struct Template Reference

#include <SerializeLayerParameters.hpp>

Static Public Member Functions

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

Detailed Description

template<>
struct armnn::StringifyLayerParameters< ViewsDescriptor >

Definition at line 83 of file SerializeLayerParameters.hpp.

Member Function Documentation

◆ Serialize()

void Serialize ( ParameterStringifyFunction fn,
const ViewsDescriptor desc 
)
static

Definition at line 201 of file SerializeLayerParameters.cpp.

References ViewsDescriptor::GetNumDimensions(), ViewsDescriptor::GetNumViews(), ViewsDescriptor::GetOrigins(), ViewsDescriptor::GetViewSizes(), and StringifyLayerParameters< LayerParameter >::Serialize().

202 {
203  uint32_t numViews = desc.GetNumViews();
204  uint32_t numDims = desc.GetNumDimensions();
205  for (uint32_t view = 0; view < numViews; ++view) {
206  std::stringstream key;
207  key << "ViewSizes#" << view;
208  std::stringstream value;
209  value << "[";
210  auto viewData = desc.GetViewSizes(view);
211  for (uint32_t dim = 0; dim < numDims; ++dim)
212  {
213  if (dim > 0)
214  {
215  value << ",";
216  }
217  value << viewData[dim];
218  }
219  value << "]";
220  fn(key.str(), value.str());
221  }
223 }
static void Serialize(ParameterStringifyFunction &, const LayerParameter &)

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