Grok  9.5.0
Namespaces | Classes | Typedefs | Functions | Variables
hwy Namespace Reference

Namespaces

 detail
 
 HWY_NAMESPACE
 
 platform
 

Classes

class  AlignedDeleter
 
class  AlignedFreer
 
struct  float16_t
 
struct  bfloat16_t
 
struct  EnableIfT
 
struct  EnableIfT< true, T >
 
struct  IsSameT
 
struct  IsSameT< T, T >
 
struct  SizeTag
 
struct  RemoveConstT
 
struct  RemoveConstT< const T >
 
struct  ImageBase
 
class  Image
 
class  Image3
 
class  Rect
 
struct  WrapMirror
 
struct  WrapUnchanged
 
class  WrapRowMirror
 
struct  WrapRowUnchanged
 
struct  FunctionCache
 
struct  Params
 
struct  Result
 
struct  ChosenTarget
 
class  TestWithParamTarget
 
class  TestWithParamTargetAndT
 
class  RandomState
 

Typedefs

using AllocPtr = void *(*)(void *opaque, size_t bytes)
 
using FreePtr = void(*)(void *opaque, void *memory)
 
template<typename T >
using AlignedUniquePtr = std::unique_ptr< T, AlignedDeleter >
 
template<typename T >
using AlignedFreeUniquePtr = std::unique_ptr< T, AlignedFreer >
 
using float32_t = float
 
using float64_t = double
 
template<bool Condition, class T = void>
using EnableIf = typename EnableIfT< Condition, T >::type
 
template<class T >
using RemoveConst = typename RemoveConstT< T >::type
 
template<typename T >
using MakeUnsigned = typename detail::Relations< T >::Unsigned
 
template<typename T >
using MakeSigned = typename detail::Relations< T >::Signed
 
template<typename T >
using MakeFloat = typename detail::Relations< T >::Float
 
template<typename T >
using MakeWide = typename detail::Relations< T >::Wide
 
template<typename T >
using MakeNarrow = typename detail::Relations< T >::Narrow
 
template<size_t N>
using UnsignedFromSize = typename detail::TypeFromSize< N >::Unsigned
 
template<size_t N>
using SignedFromSize = typename detail::TypeFromSize< N >::Signed
 
template<size_t N>
using FloatFromSize = typename detail::TypeFromSize< N >::Float
 
using ImageF = Image< float >
 
using Image3F = Image3< float >
 
using FuncInput = size_t
 
using FuncOutput = uint64_t
 
using Func = FuncOutput(*)(const void *, FuncInput)
 

Functions

void * AllocateAlignedBytes (size_t payload_size, AllocPtr alloc_ptr, void *opaque_ptr)
 
void FreeAlignedBytes (const void *aligned_pointer, FreePtr free_ptr, void *opaque_ptr)
 
template<typename T , typename... Args>
AlignedUniquePtr< T > MakeUniqueAlignedWithAlloc (AllocPtr alloc, FreePtr free, void *opaque, Args &&... args)
 
template<typename T , typename... Args>
AlignedUniquePtr< T > MakeUniqueAligned (Args &&... args)
 
template<typename T , typename... Args>
AlignedUniquePtr< T[]> MakeUniqueAlignedArrayWithAlloc (size_t items, AllocPtr alloc, FreePtr free, void *opaque, Args &&... args)
 
template<typename T , typename... Args>
AlignedUniquePtr< T[]> MakeUniqueAlignedArray (size_t items, Args &&... args)
 
template<typename T >
AlignedFreeUniquePtr< T[]> AllocateAligned (const size_t items, AllocPtr alloc, FreePtr free, void *opaque)
 
template<typename T >
AlignedFreeUniquePtr< T[]> AllocateAligned (const size_t items)
 
template<typename T , typename U >
constexpr HWY_API bool IsSame ()
 
template<typename T >
constexpr bool IsFloat ()
 
template<typename T >
constexpr bool IsSigned ()
 
template<>
constexpr bool IsSigned< float16_t > ()
 
template<>
constexpr bool IsSigned< bfloat16_t > ()
 
template<typename T >
constexpr T LimitsMax ()
 
template<typename T >
constexpr T LimitsMin ()
 
template<typename T >
constexpr T LowestValue ()
 
template<>
constexpr float LowestValue< float > ()
 
template<>
constexpr double LowestValue< double > ()
 
template<typename T >
constexpr T HighestValue ()
 
template<>
constexpr float HighestValue< float > ()
 
template<>
constexpr double HighestValue< double > ()
 
template<typename T >
constexpr T ExponentMask ()
 
template<>
constexpr uint32_t ExponentMask< uint32_t > ()
 
template<>
constexpr uint64_t ExponentMask< uint64_t > ()
 
template<typename T >
constexpr T MantissaEnd ()
 
template<>
constexpr float MantissaEnd< float > ()
 
template<>
constexpr double MantissaEnd< double > ()
 
template<typename T1 , typename T2 >
constexpr T1 DivCeil (T1 a, T2 b)
 
constexpr size_t RoundUpTo (size_t what, size_t align)
 
HWY_API size_t Num0BitsBelowLS1Bit_Nonzero32 (const uint32_t x)
 
HWY_API size_t Num0BitsBelowLS1Bit_Nonzero64 (const uint64_t x)
 
HWY_API size_t PopCount (uint64_t x)
 
HWY_API uint64_t Mul128 (uint64_t a, uint64_t b, uint64_t *HWY_RESTRICT upper)
 
template<size_t kBytes, typename From , typename To >
HWY_API void CopyBytes (const From *from, To *to)
 
HWY_API float F32FromBF16 (bfloat16_t bf)
 
HWY_API bfloat16_t BF16FromF32 (float f)
 
HWY_NORETURN void HWY_FORMAT (3, 4) Abort(const char *file
 
HWY_INLINE HWY_ATTR_CACHE void LoadFence ()
 
HWY_INLINE HWY_ATTR_CACHE void FlushStream ()
 
HWY_INLINE HWY_ATTR_CACHE void StoreFence ()
 
template<typename T >
HWY_INLINE HWY_ATTR_CACHE void Prefetch (const T *p)
 
HWY_INLINE HWY_ATTR_CACHE void FlushCacheline (const void *p)
 
HWY_INLINE HWY_ATTR_CACHE void Pause ()
 
template<class Image1 , class Image2 >
HWY_MAYBE_UNUSED bool SameSize (const Image1 &image1, const Image2 &image2)
 
static HWY_INLINE HWY_MAYBE_UNUSED size_t Mirror (int64_t x, const int64_t xsize)
 
template<typename RetType , typename... Args>
FunctionCache< RetType, Args... > FunctionCacheFactory (RetType(*)(Args...))
 
int Unpredictable1 ()
 
size_t Measure (const Func func, const uint8_t *arg, const FuncInput *inputs, const size_t num_inputs, Result *results, const Params &p=Params())
 
template<class Closure >
static FuncOutput CallClosure (const Closure *f, const FuncInput input)
 
template<class Closure >
static size_t MeasureClosure (const Closure &closure, const FuncInput *inputs, const size_t num_inputs, Result *results, const Params &p=Params())
 
uint32_t SupportedTargets ()
 
void DisableTargets (uint32_t disabled_targets)
 
void SetSupportedTargetsForTest (uint32_t targets)
 
bool SupportedTargetsCalledForTest ()
 
HWY_INLINE std::vector< uint32_t > SupportedAndGeneratedTargets ()
 
static HWY_MAYBE_UNUSED const char * TargetName (uint32_t target)
 
static std::string TestParamTargetName (const testing::TestParamInfo< uint32_t > &info)
 
template<typename T >
std::string TestParamTargetNameAndT (const testing::TestParamInfo< std::tuple< uint32_t, T >> &info)
 
static HWY_INLINE uint32_t Random32 (RandomState *rng)
 
static HWY_INLINE uint64_t Random64 (RandomState *rng)
 
template<class T >
void PreventElision (T &&output)
 
bool BytesEqual (const void *p1, const void *p2, const size_t size, size_t *pos=nullptr)
 
void AssertStringEqual (const char *expected, const char *actual, const char *target_name, const char *filename, int line)
 
template<typename T >
std::string TypeName (T, size_t N)
 
template<typename T >
HWY_INLINE bool IsEqual (const T expected, const T actual)
 
template<typename T >
HWY_INLINE void AssertEqual (const T expected, const T actual, const char *target_name, const char *filename, int line, size_t lane=0)
 

Variables

static constexpr HWY_MAYBE_UNUSED size_t kMaxVectorSize = 16
 
HWY_NORETURN void int line
 
HWY_NORETURN void int const char * format
 
ChosenTarget chosen_target
 
constexpr size_t kTestMaxVectorSize = 64
 

Typedef Documentation

◆ AlignedFreeUniquePtr

template<typename T >
using hwy::AlignedFreeUniquePtr = typedef std::unique_ptr<T, AlignedFreer>

◆ AlignedUniquePtr

template<typename T >
using hwy::AlignedUniquePtr = typedef std::unique_ptr<T, AlignedDeleter>

◆ AllocPtr

using hwy::AllocPtr = typedef void* (*)(void* opaque, size_t bytes)

◆ EnableIf

template<bool Condition, class T = void>
using hwy::EnableIf = typedef typename EnableIfT<Condition, T>::type

◆ float32_t

using hwy::float32_t = typedef float

◆ float64_t

using hwy::float64_t = typedef double

◆ FloatFromSize

template<size_t N>
using hwy::FloatFromSize = typedef typename detail::TypeFromSize<N>::Float

◆ FreePtr

using hwy::FreePtr = typedef void (*)(void* opaque, void* memory)

◆ Func

using hwy::Func = typedef FuncOutput (*)(const void*, FuncInput)

◆ FuncInput

using hwy::FuncInput = typedef size_t

◆ FuncOutput

using hwy::FuncOutput = typedef uint64_t

◆ Image3F

using hwy::Image3F = typedef Image3<float>

◆ ImageF

using hwy::ImageF = typedef Image<float>

◆ MakeFloat

template<typename T >
using hwy::MakeFloat = typedef typename detail::Relations<T>::Float

◆ MakeNarrow

template<typename T >
using hwy::MakeNarrow = typedef typename detail::Relations<T>::Narrow

◆ MakeSigned

template<typename T >
using hwy::MakeSigned = typedef typename detail::Relations<T>::Signed

◆ MakeUnsigned

template<typename T >
using hwy::MakeUnsigned = typedef typename detail::Relations<T>::Unsigned

◆ MakeWide

template<typename T >
using hwy::MakeWide = typedef typename detail::Relations<T>::Wide

◆ RemoveConst

template<class T >
using hwy::RemoveConst = typedef typename RemoveConstT<T>::type

◆ SignedFromSize

template<size_t N>
using hwy::SignedFromSize = typedef typename detail::TypeFromSize<N>::Signed

◆ UnsignedFromSize

template<size_t N>
using hwy::UnsignedFromSize = typedef typename detail::TypeFromSize<N>::Unsigned

Function Documentation

◆ AllocateAligned() [1/2]

template<typename T >
AlignedFreeUniquePtr<T[]> hwy::AllocateAligned ( const size_t  items)

◆ AllocateAligned() [2/2]

template<typename T >
AlignedFreeUniquePtr<T[]> hwy::AllocateAligned ( const size_t  items,
AllocPtr  alloc,
FreePtr  free,
void *  opaque 
)

◆ AllocateAlignedBytes()

void* hwy::AllocateAlignedBytes ( size_t  payload_size,
AllocPtr  alloc_ptr,
void *  opaque_ptr 
)

◆ AssertEqual()

template<typename T >
HWY_INLINE void hwy::AssertEqual ( const T  expected,
const T  actual,
const char *  target_name,
const char *  filename,
int  line,
size_t  lane = 0 
)

◆ AssertStringEqual()

void hwy::AssertStringEqual ( const char *  expected,
const char *  actual,
const char *  target_name,
const char *  filename,
int  line 
)

◆ BF16FromF32()

HWY_API bfloat16_t hwy::BF16FromF32 ( float  f)

◆ BytesEqual()

bool hwy::BytesEqual ( const void *  p1,
const void *  p2,
const size_t  size,
size_t *  pos = nullptr 
)

◆ CallClosure()

template<class Closure >
static FuncOutput hwy::CallClosure ( const Closure *  f,
const FuncInput  input 
)
static

◆ CopyBytes()

template<size_t kBytes, typename From , typename To >
HWY_API void hwy::CopyBytes ( const From *  from,
To *  to 
)

◆ DisableTargets()

void hwy::DisableTargets ( uint32_t  disabled_targets)

◆ DivCeil()

template<typename T1 , typename T2 >
constexpr T1 hwy::DivCeil ( T1  a,
T2  b 
)
inlineconstexpr

Referenced by RoundUpTo().

◆ ExponentMask()

template<typename T >
constexpr T hwy::ExponentMask ( )
constexpr

◆ ExponentMask< uint32_t >()

template<>
constexpr uint32_t hwy::ExponentMask< uint32_t > ( )
constexpr

◆ ExponentMask< uint64_t >()

template<>
constexpr uint64_t hwy::ExponentMask< uint64_t > ( )
constexpr

◆ F32FromBF16()

HWY_API float hwy::F32FromBF16 ( bfloat16_t  bf)

◆ FlushCacheline()

HWY_INLINE HWY_ATTR_CACHE void hwy::FlushCacheline ( const void *  p)

◆ FlushStream()

HWY_INLINE HWY_ATTR_CACHE void hwy::FlushStream ( )

Referenced by StoreFence().

◆ FreeAlignedBytes()

void hwy::FreeAlignedBytes ( const void *  aligned_pointer,
FreePtr  free_ptr,
void *  opaque_ptr 
)

◆ FunctionCacheFactory()

template<typename RetType , typename... Args>
FunctionCache<RetType, Args...> hwy::FunctionCacheFactory ( RetType(*)(Args...)  )

◆ HighestValue()

template<typename T >
constexpr T hwy::HighestValue ( )
constexpr

◆ HighestValue< double >()

template<>
constexpr double hwy::HighestValue< double > ( )
constexpr

◆ HighestValue< float >()

template<>
constexpr float hwy::HighestValue< float > ( )
constexpr

◆ HWY_FORMAT()

HWY_NORETURN void hwy::HWY_FORMAT ( ,
 
) const

◆ IsEqual()

template<typename T >
HWY_INLINE bool hwy::IsEqual ( const T  expected,
const T  actual 
)

◆ IsFloat()

template<typename T >
constexpr bool hwy::IsFloat ( )
constexpr

◆ IsSame()

template<typename T , typename U >
constexpr HWY_API bool hwy::IsSame ( )
constexpr

◆ IsSigned()

template<typename T >
constexpr bool hwy::IsSigned ( )
constexpr

◆ IsSigned< bfloat16_t >()

template<>
constexpr bool hwy::IsSigned< bfloat16_t > ( )
constexpr

◆ IsSigned< float16_t >()

template<>
constexpr bool hwy::IsSigned< float16_t > ( )
constexpr

◆ LimitsMax()

template<typename T >
constexpr T hwy::LimitsMax ( )
constexpr

Referenced by hwy::HWY_NAMESPACE::NaN().

◆ LimitsMin()

template<typename T >
constexpr T hwy::LimitsMin ( )
constexpr

◆ LoadFence()

HWY_INLINE HWY_ATTR_CACHE void hwy::LoadFence ( )

◆ LowestValue()

template<typename T >
constexpr T hwy::LowestValue ( )
constexpr

◆ LowestValue< double >()

template<>
constexpr double hwy::LowestValue< double > ( )
constexpr

◆ LowestValue< float >()

template<>
constexpr float hwy::LowestValue< float > ( )
constexpr

◆ MakeUniqueAligned()

template<typename T , typename... Args>
AlignedUniquePtr<T> hwy::MakeUniqueAligned ( Args &&...  args)

◆ MakeUniqueAlignedArray()

template<typename T , typename... Args>
AlignedUniquePtr<T[]> hwy::MakeUniqueAlignedArray ( size_t  items,
Args &&...  args 
)

◆ MakeUniqueAlignedArrayWithAlloc()

template<typename T , typename... Args>
AlignedUniquePtr<T[]> hwy::MakeUniqueAlignedArrayWithAlloc ( size_t  items,
AllocPtr  alloc,
FreePtr  free,
void *  opaque,
Args &&...  args 
)

Referenced by MakeUniqueAlignedArray().

◆ MakeUniqueAlignedWithAlloc()

template<typename T , typename... Args>
AlignedUniquePtr<T> hwy::MakeUniqueAlignedWithAlloc ( AllocPtr  alloc,
FreePtr  free,
void *  opaque,
Args &&...  args 
)

◆ MantissaEnd()

template<typename T >
constexpr T hwy::MantissaEnd ( )
constexpr

◆ MantissaEnd< double >()

template<>
constexpr double hwy::MantissaEnd< double > ( )
constexpr

◆ MantissaEnd< float >()

template<>
constexpr float hwy::MantissaEnd< float > ( )
constexpr

◆ Measure()

size_t hwy::Measure ( const Func  func,
const uint8_t *  arg,
const FuncInput inputs,
const size_t  num_inputs,
Result results,
const Params p = Params() 
)

Referenced by MeasureClosure().

◆ MeasureClosure()

template<class Closure >
static size_t hwy::MeasureClosure ( const Closure &  closure,
const FuncInput inputs,
const size_t  num_inputs,
Result results,
const Params p = Params() 
)
inlinestatic

References Measure().

◆ Mirror()

static HWY_INLINE HWY_MAYBE_UNUSED size_t hwy::Mirror ( int64_t  x,
const int64_t  xsize 
)
static

References HWY_DASSERT.

Referenced by hwy::WrapMirror::operator()().

◆ Mul128()

HWY_API uint64_t hwy::Mul128 ( uint64_t  a,
uint64_t  b,
uint64_t *HWY_RESTRICT  upper 
)

◆ Num0BitsBelowLS1Bit_Nonzero32()

HWY_API size_t hwy::Num0BitsBelowLS1Bit_Nonzero32 ( const uint32_t  x)

◆ Num0BitsBelowLS1Bit_Nonzero64()

HWY_API size_t hwy::Num0BitsBelowLS1Bit_Nonzero64 ( const uint64_t  x)

◆ Pause()

HWY_INLINE HWY_ATTR_CACHE void hwy::Pause ( )

◆ PopCount()

HWY_API size_t hwy::PopCount ( uint64_t  x)

◆ Prefetch()

template<typename T >
HWY_INLINE HWY_ATTR_CACHE void hwy::Prefetch ( const T *  p)

◆ PreventElision()

template<class T >
void hwy::PreventElision ( T &&  output)
inline

◆ Random32()

static HWY_INLINE uint32_t hwy::Random32 ( RandomState rng)
static

◆ Random64()

static HWY_INLINE uint64_t hwy::Random64 ( RandomState rng)
static

◆ RoundUpTo()

constexpr size_t hwy::RoundUpTo ( size_t  what,
size_t  align 
)
inlineconstexpr

References DivCeil().

◆ SameSize()

template<class Image1 , class Image2 >
HWY_MAYBE_UNUSED bool hwy::SameSize ( const Image1 &  image1,
const Image2 &  image2 
)

◆ SetSupportedTargetsForTest()

void hwy::SetSupportedTargetsForTest ( uint32_t  targets)

◆ StoreFence()

HWY_INLINE HWY_ATTR_CACHE void hwy::StoreFence ( )

References FlushStream().

◆ SupportedAndGeneratedTargets()

HWY_INLINE std::vector<uint32_t> hwy::SupportedAndGeneratedTargets ( )

References HWY_TARGETS, and SupportedTargets().

◆ SupportedTargets()

uint32_t hwy::SupportedTargets ( )

◆ SupportedTargetsCalledForTest()

bool hwy::SupportedTargetsCalledForTest ( )

◆ TargetName()

static HWY_MAYBE_UNUSED const char* hwy::TargetName ( uint32_t  target)
inlinestatic

◆ TestParamTargetName()

static std::string hwy::TestParamTargetName ( const testing::TestParamInfo< uint32_t > &  info)
inlinestatic

References ojph::info, and TargetName().

◆ TestParamTargetNameAndT()

template<typename T >
std::string hwy::TestParamTargetNameAndT ( const testing::TestParamInfo< std::tuple< uint32_t, T >> &  info)

References ojph::info, and TargetName().

◆ TypeName()

template<typename T >
std::string hwy::TypeName ( ,
size_t  N 
)

◆ Unpredictable1()

int hwy::Unpredictable1 ( )

Variable Documentation

◆ chosen_target

ChosenTarget hwy::chosen_target
extern

◆ format

HWY_NORETURN void int const char* hwy::format

Referenced by grk::log().

◆ kMaxVectorSize

constexpr HWY_MAYBE_UNUSED size_t hwy::kMaxVectorSize = 16
staticconstexpr

◆ kTestMaxVectorSize

constexpr size_t hwy::kTestMaxVectorSize = 64
constexpr

◆ line

HWY_NORETURN void int hwy::line