Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
field_utils.hpp
Go to the documentation of this file.
1
8#ifndef FIELD_UTILS_HPP_
9#define FIELD_UTILS_HPP_
10#include <cstdint>
11
15
16namespace libff {
17
18// returns root of unity of order n (for n a power of 2), if one exists
19template<typename FieldT>
20typename std::enable_if<std::is_same<FieldT, Double>::value, FieldT>::type
21get_root_of_unity(const size_t n);
22
23template<typename FieldT>
24typename std::enable_if<!std::is_same<FieldT, Double>::value, FieldT>::type
25get_root_of_unity(const size_t n);
26
27template<typename FieldT>
28std::vector<FieldT> pack_int_vector_into_field_element_vector(const std::vector<size_t> &v, const size_t w);
29
30template<typename FieldT>
31std::vector<FieldT> pack_bit_vector_into_field_element_vector(const bit_vector &v, const size_t chunk_bits);
32
33template<typename FieldT>
35
36template<typename FieldT>
38
39template<typename FieldT>
41
42template<typename FieldT>
44
45template<typename FieldT>
46bit_vector convert_field_element_to_bit_vector(const FieldT &el, const size_t bitcount);
47
48template<typename FieldT>
50
51template<typename FieldT>
52void batch_invert(std::vector<FieldT> &vec);
53
54} // libff
55#include <libff/algebra/fields/field_utils.tcc>
56
57#endif // FIELD_UTILS_HPP_
bit_vector convert_field_element_vector_to_bit_vector(const std::vector< FieldT > &v)
std::vector< FieldT > convert_bit_vector_to_field_element_vector(const bit_vector &v)
std::enable_if< std::is_same< FieldT, Double >::value, FieldT >::type get_root_of_unity(const size_t n)
std::vector< FieldT > pack_bit_vector_into_field_element_vector(const bit_vector &v, const size_t chunk_bits)
std::vector< bool > bit_vector
Definition utils.hpp:21
FieldT convert_bit_vector_to_field_element(const bit_vector &v)
std::vector< FieldT > pack_int_vector_into_field_element_vector(const std::vector< size_t > &v, const size_t w)
void batch_invert(std::vector< FieldT > &vec)
bit_vector convert_field_element_to_bit_vector(const FieldT &el)