ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnfw::cker::random::UniformFullIntDistribution64< Generator, IntType > Class Template Reference

#include <RandomDistributions.h>

Public Types

typedef Array< IntType, kResultElementCountResultType
 
typedef IntType ResultElementType
 

Public Member Functions

PHILOX_DEVICE_INLINE ResultType operator() (Generator *gen)
 

Static Public Attributes

static constexpr int kResultElementCount = Generator::kResultElementCount / 2
 
static constexpr int kElementCost = 3
 
static constexpr bool kVariableSamplesPerOutput = false
 

Detailed Description

template<typename Generator, typename IntType>
class nnfw::cker::random::UniformFullIntDistribution64< Generator, IntType >

Definition at line 266 of file RandomDistributions.h.

Member Typedef Documentation

◆ ResultElementType

template<typename Generator , typename IntType >
typedef IntType nnfw::cker::random::UniformFullIntDistribution64< Generator, IntType >::ResultElementType

Definition at line 277 of file RandomDistributions.h.

◆ ResultType

template<typename Generator , typename IntType >
typedef Array<IntType, kResultElementCount> nnfw::cker::random::UniformFullIntDistribution64< Generator, IntType >::ResultType

Definition at line 276 of file RandomDistributions.h.

Member Function Documentation

◆ operator()()

template<typename Generator , typename IntType >
PHILOX_DEVICE_INLINE ResultType nnfw::cker::random::UniformFullIntDistribution64< Generator, IntType >::operator() ( Generator *  gen)
inline

Definition at line 280 of file RandomDistributions.h.

281 {
282 typename Generator::ResultType sample = (*gen)();
284 for (int i = 0; i < kResultElementCount; ++i)
285 {
286 result[i] = sample[2 * i] | static_cast<uint64_t>(sample[2 * i + 1]) << 32;
287 }
288 return result;
289 }
Array< IntType, kResultElementCount > ResultType
result
Definition infer.py:103

References nnfw::cker::random::UniformFullIntDistribution64< Generator, IntType >::kResultElementCount.

Field Documentation

◆ kElementCost

template<typename Generator , typename IntType >
constexpr int nnfw::cker::random::UniformFullIntDistribution64< Generator, IntType >::kElementCost = 3
staticconstexpr

Definition at line 272 of file RandomDistributions.h.

◆ kResultElementCount

template<typename Generator , typename IntType >
constexpr int nnfw::cker::random::UniformFullIntDistribution64< Generator, IntType >::kResultElementCount = Generator::kResultElementCount / 2
staticconstexpr

◆ kVariableSamplesPerOutput

template<typename Generator , typename IntType >
constexpr bool nnfw::cker::random::UniformFullIntDistribution64< Generator, IntType >::kVariableSamplesPerOutput = false
staticconstexpr

Definition at line 275 of file RandomDistributions.h.


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