nil::crypto3::detail::host_can_memcpy< UnitBits, InputBits, OutputBits, InT, OutT > Struct Template Reference

The group of traits below is used to determine the possibility of fast data copy. By fast data copy we mean that the data is stored contiguously in the memory, so it can be copied faster byte-by-byte. Currently, fast data copy is implemented by memcpy function call. More...

#include <pack.hpp>

+ Inheritance diagram for nil::crypto3::detail::host_can_memcpy< UnitBits, InputBits, OutputBits, InT, OutT >:
+ Collaboration diagram for nil::crypto3::detail::host_can_memcpy< UnitBits, InputBits, OutputBits, InT, OutT >:

Static Public Attributes

constexpr static const bool value
 
static bool const value
 

Detailed Description

template<int UnitBits, int InputBits, int OutputBits, typename InT, typename OutT>
struct nil::crypto3::detail::host_can_memcpy< UnitBits, InputBits, OutputBits, InT, OutT >

The group of traits below is used to determine the possibility of fast data copy. By fast data copy we mean that the data is stored contiguously in the memory, so it can be copied faster byte-by-byte. Currently, fast data copy is implemented by memcpy function call.

host_can_memcpy trait checks whether the data to be copied and the container to be copied to are byte-aligned. Parameter types InT and OutT may refer to pointed data types or to iterator types.

Template Parameters
UnitBits
ValueBits
InT
OutT

Member Data Documentation

◆ value [1/2]

template<int UnitBits, int InputBits, int OutputBits, typename InT , typename OutT >
static bool const nil::crypto3::detail::host_can_memcpy< UnitBits, InputBits, OutputBits, InT, OutT >::value
staticconstexpr
Initial value:
= !(UnitBits % CHAR_BIT) && InputBits >= UnitBits &&
OutputBits >= UnitBits && sizeof(InT) * CHAR_BIT == InputBits &&
sizeof(OutT) * CHAR_BIT == OutputBits

◆ value [2/2]

template<int UnitBits, int InputBits, int OutputBits, typename InT , typename OutT >
bool const nil::crypto3::detail::host_can_memcpy< UnitBits, InputBits, OutputBits, InT, OutT >::value
static
Initial value:
= !(UnitBits % CHAR_BIT) && InputBits >= UnitBits && OutputBits >= UnitBits &&
sizeof(InT) * CHAR_BIT == InputBits && sizeof(OutT) * CHAR_BIT == OutputBits

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