Compute Library
 22.08
GenericDepthfirstStrategy< TInput, TWeight, TOutput, TAccum, OutputStage > Class Template Reference

#include <depthwise_depthfirst_generic.hpp>

Collaboration diagram for GenericDepthfirstStrategy< TInput, TWeight, TOutput, TAccum, OutputStage >:
[legend]

Public Member Functions

 GenericDepthfirstStrategy (KernelStrategyType *strat, unsigned int n_output_rows, unsigned int n_output_cols, const DepthwiseArgs &args)
 
 GenericDepthfirstStrategy (GenericDepthfirstStrategy &)=delete
 
GenericDepthfirstStrategy operator= (GenericDepthfirstStrategy &)=delete
 
arm_gemm::VLType get_vl_type (void) const override
 
unsigned int get_accumulator_depth_vl (void) const override
 
size_t get_storage_size (const DepthwiseArgs &args) const override
 
void pack_parameters (const DepthwiseArgs &args, void *buffer, const void *biases, const OutputStage &, const void *weights, size_t ld_weight_col, size_t ld_weight_row) const override
 
const KernelStrategyType::KernelType get_kernel () const
 
- Public Member Functions inherited from DepthwiseDepthfirstStrategyCommon< TInput, TWeight, TOutput, TAccum, OutputStage >
 DepthwiseDepthfirstStrategyCommon (unsigned int output_rows, unsigned int output_cols, unsigned int kernel_rows, unsigned int kernel_cols, unsigned int stride_rows=1, unsigned int stride_cols=1)
 
 DepthwiseDepthfirstStrategyCommon (unsigned int output_size, unsigned int kernel_size, unsigned int stride=1)
 
virtual ~DepthwiseDepthfirstStrategyCommon ()
 
unsigned int get_output_rows () const override
 
unsigned int get_output_cols () const override
 
unsigned int get_kernel_rows () const override
 
unsigned int get_kernel_cols () const override
 
unsigned int get_stride_rows () const override
 
unsigned int get_stride_cols () const override
 
- Public Member Functions inherited from DepthfirstStrategyUntyped
virtual unsigned int get_input_rows () const override
 
virtual unsigned int get_input_cols () const override
 
virtual unsigned int get_n_input_points () const
 
virtual unsigned int get_n_output_points () const
 
virtual unsigned int get_n_kernel_points () const
 
virtual bool get_kernel_packing_point (const unsigned int index, unsigned int &x, unsigned int &y) const
 
- Public Member Functions inherited from IDepthfirstStrategy
virtual ~IDepthfirstStrategy ()=default
 

Detailed Description

template<typename TInput, typename TWeight = TInput, typename TOutput = TInput, typename TAccum = typename DefaultTAccum<TInput>::Type, typename OutputStage = typename DefaultOutputStage<TOutput>::Type>
class arm_conv::depthwise::GenericDepthfirstStrategy< TInput, TWeight, TOutput, TAccum, OutputStage >

Definition at line 72 of file depthwise_depthfirst_generic.hpp.

Constructor & Destructor Documentation

◆ GenericDepthfirstStrategy() [1/2]

GenericDepthfirstStrategy ( KernelStrategyType strat,
unsigned int  n_output_rows,
unsigned int  n_output_cols,
const DepthwiseArgs &  args 
)
inline

Definition at line 79 of file depthwise_depthfirst_generic.hpp.

83  : DepthwiseDepthfirstStrategyCommon<TInput, TWeight, TOutput, TAccum, OutputStage>(
84  n_output_rows, n_output_cols,
85  args.kernel_rows, args.kernel_cols,
86  args.stride_rows, args.stride_cols
87  ),
88  m_strategy(strat)
89  {
90  }

◆ GenericDepthfirstStrategy() [2/2]

GenericDepthfirstStrategy ( GenericDepthfirstStrategy< TInput, TWeight, TOutput, TAccum, OutputStage > &  )
delete

Member Function Documentation

◆ get_accumulator_depth_vl()

unsigned int get_accumulator_depth_vl ( void  ) const
inlineoverridevirtual

Reimplemented from DepthfirstStrategyUntyped.

Definition at line 96 of file depthwise_depthfirst_generic.hpp.

96 { return m_strategy->get_accumulator_depth_vl(); }

◆ get_kernel()

const KernelStrategyType::KernelType get_kernel ( void  ) const
inline

Definition at line 127 of file depthwise_depthfirst_generic.hpp.

127 { return m_strategy->get_kernel(); }

◆ get_storage_size()

size_t get_storage_size ( const DepthwiseArgs &  args) const
inlineoverridevirtual

Reimplemented from DepthfirstStrategy< TInput, TWeight, TOutput, TAccum, OutputStage >.

Definition at line 98 of file depthwise_depthfirst_generic.hpp.

References arm_conv::depthwise::interleaves::get_storage_size_generic().

99  {
100  interleaves::PackingArguments packing_args(
101  this->get_kernel_rows(), this->get_kernel_cols(), sizeof(TWeight),
102  false, sizeof(TAccum), // Don't pack the bias
103  this->get_vl_type(), sizeof(TAccum), this->get_accumulator_depth_vl(),
104  [this] (unsigned int idx, unsigned int &x, unsigned int &y) -> bool
105  { return this->get_kernel_packing_point(idx, x, y); }
106  );
107  return interleaves::get_storage_size_generic(packing_args, args);
108  }
size_t get_storage_size_generic(const PackingArguments &packing_args, const DepthwiseArgs &args)
Definition: generic.cpp:45
virtual bool get_kernel_packing_point(const unsigned int index, unsigned int &x, unsigned int &y) const

◆ get_vl_type()

arm_gemm::VLType get_vl_type ( void  ) const
inlineoverridevirtual

Implements DepthfirstStrategyUntyped.

Definition at line 95 of file depthwise_depthfirst_generic.hpp.

95 { return m_strategy->get_vl_type(); }

◆ operator=()

GenericDepthfirstStrategy operator= ( GenericDepthfirstStrategy< TInput, TWeight, TOutput, TAccum, OutputStage > &  )
delete

◆ pack_parameters()

void pack_parameters ( const DepthwiseArgs &  args,
void *  buffer,
const void *  biases,
const OutputStage &  ,
const void *  weights,
size_t  ld_weight_col,
size_t  ld_weight_row 
) const
inlineoverridevirtual

Reimplemented from DepthfirstStrategy< TInput, TWeight, TOutput, TAccum, OutputStage >.

Definition at line 110 of file depthwise_depthfirst_generic.hpp.

References arm_conv::depthwise::interleaves::pack_parameters_generic().

115  {
116  interleaves::PackingArguments packing_args(
117  this->get_kernel_rows(), this->get_kernel_cols(), sizeof(TWeight),
118  false, sizeof(TAccum), // Don't pack the bias
119  this->get_vl_type(), sizeof(TAccum), this->get_accumulator_depth_vl(),
120  [this] (unsigned int idx, unsigned int &x, unsigned int &y) -> bool
121  { return this->get_kernel_packing_point(idx, x, y); }
122  );
124  packing_args, args, buffer, biases, weights, ld_weight_col, ld_weight_row);
125  }
virtual bool get_kernel_packing_point(const unsigned int index, unsigned int &x, unsigned int &y) const
void pack_parameters_generic(const PackingArguments &packing_args, const DepthwiseArgs &args, void *buffer_raw, const void *biases_raw, const void *weights_raw, size_t ld_weight_col, size_t ld_weight_row)
Definition: generic.cpp:67

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