jaulib v1.3.6
Jau Support Library (C++, Java, ..)
Loading...
Searching...
No Matches
ct_utils.hpp File Reference
#include <type_traits>
#include <jau/int_math.hpp>
Include dependency graph for ct_utils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  jau::CT::Mask< T, >
 A Mask type used for constant-time operations. More...
 

Namespaces

namespace  jau
 __pack(...): Produces MSVC, clang and gcc compatible lead-in and -out macros.
 
namespace  jau::CT
 Functions for constant time operations on data and testing of constant time annotations using valgrind.
 

Functions

template<typename T>
Mask< T > jau::CT::conditional_copy_mem (T cnd, T *to, const T *from0, const T *from1, size_t elems) noexcept
 
template<typename T>
void jau::CT::conditional_swap (bool cnd, T &x, T &y) noexcept
 
template<typename T, std::enable_if_t< std::is_pointer_v< T >, bool > = true>
void jau::CT::conditional_swap_ptr (bool cnd, T &x, T &y) noexcept
 
template<typename T>
void jau::CT::poison (const T *p, size_t n)
 Use valgrind to mark the contents of memory as being undefined.
 
template<typename T>
void jau::CT::unpoison (const T *p, size_t n)
 
template<typename T>
void jau::CT::unpoison (T &p)