MOTION  0.01
Framework for mixed-protocol multi-party computation
Classes | Namespaces | Typedefs | Functions | Variables
bit_vector.h File Reference
#include <cstddef>
#include <iostream>
#include <memory>
#include <random>
#include <string>
#include <vector>
#include <fmt/format.h>
#include <boost/align/aligned_allocator.hpp>
#include "config.h"
#include "helpers.h"
Include dependency graph for bit_vector.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  encrypto::motion::BitVector< Allocator >
 Class representing a series of bits and providing single bit access. More...
 
class  encrypto::motion::BitSpan
 Non-owning non-resizeable BitVector. More...
 

Namespaces

 encrypto
 
 encrypto::motion
 

Typedefs

using encrypto::motion::StdAllocator = std::allocator< std::byte >
 
using encrypto::motion::AlignedAllocator = boost::alignment::aligned_allocator< std::byte, kAlignment >
 
using encrypto::motion::AlignedBitVector = BitVector< AlignedAllocator >
 

Functions

template<typename Allocator >
std::ostream & encrypto::motion::operator<< (std::ostream &os, const BitVector< Allocator > &bit_vector)
 Output string representation of BitVector to std::ostream. More...
 
template<typename T , typename = std::enable_if_t<std::is_floating_point_v<T> || std::is_unsigned_v<T>>, typename Allocator = std::allocator<std::byte>>
std::vector< BitVector< Allocator > > encrypto::motion::ToInput (const std::vector< T > &vector)
 Converts a vector of an unsigned integer type or a floating point type to a vector of BitVector. More...
 
template<typename UnsignedIntegralType , typename = std::enable_if_t<std::is_unsigned_v<UnsignedIntegralType>>, typename Allocator = std::allocator<std::byte>>
UnsignedIntegralType encrypto::motion::ToOutput (std::vector< BitVector< Allocator >> bit_vectors)
 Converts a vector of BitVectors to a value of UnsignedIntegralType. More...
 
std::ostream & encrypto::motion::operator<< (std::ostream &os, const BitSpan &bit_span)
 Output string representation of BitVector to std::ostream. More...
 

Variables

constexpr std::byte encrypto::motion::kSetBitMask []
 
constexpr std::byte encrypto::motion::kUnsetBitMask []
 
constexpr std::byte encrypto::motion::TruncationBitMask []