nil::marshalling::field_bincode< FieldType > Struct Template Reference

#include <marshalling.hpp>

+ Collaboration diagram for nil::marshalling::field_bincode< FieldType >:

Public Types

typedef std::uint8_t chunk_type
 
typedef FieldType field_type
 
typedef field_type::value_type field_value_type
 

Static Public Member Functions

template<typename InputFieldValueIterator >
static std::enable_if< !crypto3::algebra::is_extended_field< field_type >::value &&std::is_same< chunk_type, typename std::iterator_traits< InputFieldValueIterator >::value_type >::value, std::pair< bool, field_value_type > >::type field_element_from_bytes (InputFieldValueIterator first, InputFieldValueIterator last)
 
template<typename InputFieldValueIterator >
static std::enable_if< crypto3::algebra::is_extended_field< field_type >::value &&std::is_same< chunk_type, typename std::iterator_traits< InputFieldValueIterator >::value_type >::value, std::pair< bool, field_value_type > >::type field_element_from_bytes (InputFieldValueIterator first, InputFieldValueIterator last)
 
template<typename OutputIterator >
static std::enable_if< !crypto3::algebra::is_extended_field< field_type >::value &&std::is_same< chunk_type, typename std::iterator_traits< OutputIterator >::value_type >::value, std::size_t >::type field_element_to_bytes (const field_value_type &element, OutputIterator out_first, OutputIterator out_last)
 
template<typename OutputIterator >
static std::enable_if< crypto3::algebra::is_extended_field< field_type >::value &&std::is_same< chunk_type, typename std::iterator_traits< OutputIterator >::value_type >::value, std::size_t >::type field_element_to_bytes (const field_value_type &element, OutputIterator out_first, OutputIterator out_last)
 
constexpr static std::size_t get_element_size ()
 

Static Public Attributes

constexpr static const std::size_t chunk_size = 8
 
constexpr static std::size_t field_octets_num = field_type::arity * modulus_chunks
 
constexpr static std::size_t modulus_chunks
 

Member Typedef Documentation

◆ chunk_type

template<typename FieldType >
typedef std::uint8_t nil::marshalling::field_bincode< FieldType >::chunk_type

◆ field_type

template<typename FieldType >
typedef FieldType nil::marshalling::field_bincode< FieldType >::field_type

◆ field_value_type

template<typename FieldType >
typedef field_type::value_type nil::marshalling::field_bincode< FieldType >::field_value_type

Member Function Documentation

◆ field_element_from_bytes() [1/2]

template<typename FieldType >
template<typename InputFieldValueIterator >
static std::enable_if< !crypto3::algebra::is_extended_field<field_type>::value && std::is_same<chunk_type, typename std::iterator_traits<InputFieldValueIterator>::value_type>::value, std::pair<bool, field_value_type> >::type nil::marshalling::field_bincode< FieldType >::field_element_from_bytes ( InputFieldValueIterator  first,
InputFieldValueIterator  last 
)
inlinestatic

◆ field_element_from_bytes() [2/2]

template<typename FieldType >
template<typename InputFieldValueIterator >
static std::enable_if< crypto3::algebra::is_extended_field<field_type>::value && std::is_same<chunk_type, typename std::iterator_traits<InputFieldValueIterator>::value_type>::value, std::pair<bool, field_value_type> >::type nil::marshalling::field_bincode< FieldType >::field_element_from_bytes ( InputFieldValueIterator  first,
InputFieldValueIterator  last 
)
inlinestatic

◆ field_element_to_bytes() [1/2]

template<typename FieldType >
template<typename OutputIterator >
static std::enable_if< !crypto3::algebra::is_extended_field<field_type>::value && std::is_same<chunk_type, typename std::iterator_traits<OutputIterator>::value_type>::value, std::size_t>::type nil::marshalling::field_bincode< FieldType >::field_element_to_bytes ( const field_value_type element,
OutputIterator  out_first,
OutputIterator  out_last 
)
inlinestatic

◆ field_element_to_bytes() [2/2]

template<typename FieldType >
template<typename OutputIterator >
static std::enable_if< crypto3::algebra::is_extended_field<field_type>::value && std::is_same<chunk_type, typename std::iterator_traits<OutputIterator>::value_type>::value, std::size_t>::type nil::marshalling::field_bincode< FieldType >::field_element_to_bytes ( const field_value_type element,
OutputIterator  out_first,
OutputIterator  out_last 
)
inlinestatic

◆ get_element_size()

template<typename FieldType >
constexpr static std::size_t nil::marshalling::field_bincode< FieldType >::get_element_size ( )
inlinestaticconstexpr

Member Data Documentation

◆ chunk_size

template<typename FieldType >
constexpr static const std::size_t nil::marshalling::field_bincode< FieldType >::chunk_size = 8
staticconstexpr

◆ field_octets_num

template<typename FieldType >
constexpr static std::size_t nil::marshalling::field_bincode< FieldType >::field_octets_num = field_type::arity * modulus_chunks
staticconstexpr

◆ modulus_chunks

template<typename FieldType >
constexpr static std::size_t nil::marshalling::field_bincode< FieldType >::modulus_chunks
staticconstexpr
Initial value:
=
field_type::modulus_bits / chunk_size + (field_type::modulus_bits % chunk_size ? 1 : 0)
constexpr static const std::size_t chunk_size
Definition: algebra/include/nil/crypto3/algebra/marshalling.hpp:49

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