Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
aligned_memory.h File Reference
#include <cstddef>
#include <cstdint>
#include <vector>
#include "ortools/util/aligned_memory_internal.h"

Go to the source code of this file.

Namespaces

namespace  operations_research
 In SWIG mode, we don't want anything besides these top-level includes.
 
namespace  operations_research::use_only_in_tests
 

Typedefs

template<typename T , size_t alignment_bytes>
using operations_research::AlignedAllocator
 Support for aligned containers in STL.
 
template<typename T , size_t alignment_bytes>
using operations_research::AlignedVector = std::vector<T, AlignedAllocator<T, alignment_bytes>>
 
template<typename T , size_t alignment_bytes, size_t misalignment_bytes>
using operations_research::use_only_in_tests::MisalignedAllocator
 
template<typename T , size_t alignment_bytes, size_t misalignment_bytes>
using operations_research::use_only_in_tests::MisalignedVector
 

Functions

template<size_t alignment_bytes, typename Value >
Value * operations_research::AlignUp (Value *ptr)
 
template<size_t alignment_bytes, typename Value >
Value * operations_research::AlignDown (Value *ptr)
 
template<size_t alignment_bytes, typename Value >
bool operations_research::IsAligned (Value *ptr)
 Returns true when ptr is aligned to alignment_bytes bytes.