Compute Library
 21.08
DummyAccessor Class Referencefinal

Dummy accessor class. More...

#include <GraphUtils.h>

Collaboration diagram for DummyAccessor:
[legend]

Public Member Functions

 DummyAccessor (unsigned int maximum=1)
 Constructor. More...
 
 DummyAccessor (DummyAccessor &&)=default
 Allows instances to move constructed. More...
 
bool access_tensor (ITensor &tensor) override
 Interface to be implemented to access a given tensor. More...
 
- Public Member Functions inherited from ITensorAccessor
virtual ~ITensorAccessor ()=default
 Default virtual destructor. More...
 

Detailed Description

Dummy accessor class.

Definition at line 126 of file GraphUtils.h.

Constructor & Destructor Documentation

◆ DummyAccessor() [1/2]

DummyAccessor ( unsigned int  maximum = 1)

Constructor.

Parameters
[in]maximumMaximum elements to write

Definition at line 160 of file GraphUtils.cpp.

161  : _iterator(0), _maximum(maximum)
162 {
163 }

◆ DummyAccessor() [2/2]

DummyAccessor ( DummyAccessor &&  )
default

Allows instances to move constructed.

Member Function Documentation

◆ access_tensor()

bool access_tensor ( ITensor tensor)
overridevirtual

Interface to be implemented to access a given tensor.

Parameters
[in]tensorTensor to be accessed
Returns
True if access is successful else false

Implements ITensorAccessor.

Definition at line 165 of file GraphUtils.cpp.

References ARM_COMPUTE_UNUSED.

166 {
167  ARM_COMPUTE_UNUSED(tensor);
168  bool ret = _maximum == 0 || _iterator < _maximum;
169  if(_iterator == _maximum)
170  {
171  _iterator = 0;
172  }
173  else
174  {
175  _iterator++;
176  }
177  return ret;
178 }
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Definition: Error.h:152

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