ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnfw::cker::random::Array< T, ElementCount > Class Template Reference

#include <PhiloxRandom.h>

Public Member Functions

PHILOX_DEVICE_INLINE Array ()
 
PHILOX_DEVICE_INLINE const T & operator[] (int index) const
 
PHILOX_DEVICE_INLINE T & operator[] (int index)
 
size_t size () const
 

Static Public Attributes

static constexpr int kElementCount = ElementCount
 

Detailed Description

template<typename T, int ElementCount>
class nnfw::cker::random::Array< T, ElementCount >

Definition at line 53 of file PhiloxRandom.h.

Constructor & Destructor Documentation

◆ Array()

template<typename T , int ElementCount>
PHILOX_DEVICE_INLINE nnfw::cker::random::Array< T, ElementCount >::Array ( )
inline

Definition at line 57 of file PhiloxRandom.h.

58 {
59 for (int i = 0; i < ElementCount; ++i)
60 {
61 data_[i] = T(0);
62 }
63 }

Member Function Documentation

◆ operator[]() [1/2]

template<typename T , int ElementCount>
PHILOX_DEVICE_INLINE T & nnfw::cker::random::Array< T, ElementCount >::operator[] ( int  index)
inline

Definition at line 67 of file PhiloxRandom.h.

67{ return data_[index]; }
loco::GraphInputIndex index(const TFPlaceholder *node)
Definition TFNode.cpp:54

◆ operator[]() [2/2]

template<typename T , int ElementCount>
PHILOX_DEVICE_INLINE const T & nnfw::cker::random::Array< T, ElementCount >::operator[] ( int  index) const
inline

Definition at line 65 of file PhiloxRandom.h.

65{ return data_[index]; }

◆ size()

template<typename T , int ElementCount>
size_t nnfw::cker::random::Array< T, ElementCount >::size ( ) const
inline

Definition at line 69 of file PhiloxRandom.h.

69{ return ElementCount; }

Field Documentation

◆ kElementCount

template<typename T , int ElementCount>
constexpr int nnfw::cker::random::Array< T, ElementCount >::kElementCount = ElementCount
staticconstexpr

Definition at line 56 of file PhiloxRandom.h.


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