xapian-core  1.4.26
Functions
wordaccess.h File Reference

functions for reading and writing different width words More...

#include <cstdint>
#include <type_traits>
#include <cstring>
#include "alignment_cast.h"
#include "omassert.h"
+ Include dependency graph for wordaccess.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint16_t do_bswap (uint16_t value)
 
uint32_t do_bswap (uint32_t value)
 
uint64_t do_bswap (uint64_t value)
 
template<typename UINT >
UINT do_aligned_read (const unsigned char *ptr)
 
template<typename T , typename UINT >
void do_aligned_write (unsigned char *ptr, T value)
 
template<typename UINT >
UINT do_unaligned_read (const unsigned char *ptr)
 
template<typename T , typename UINT >
void do_unaligned_write (unsigned char *ptr, T value)
 
uint32_t aligned_read4 (const unsigned char *ptr)
 
uint32_t unaligned_read4 (const unsigned char *ptr)
 
uint16_t aligned_read2 (const unsigned char *ptr)
 
uint16_t unaligned_read2 (const unsigned char *ptr)
 
template<typename T >
void aligned_write4 (unsigned char *ptr, T value)
 
template<typename T >
void unaligned_write4 (unsigned char *ptr, T value)
 
template<typename T >
void aligned_write2 (unsigned char *ptr, T value)
 
template<typename T >
void unaligned_write2 (unsigned char *ptr, T value)
 

Detailed Description

functions for reading and writing different width words

Definition in file wordaccess.h.

Function Documentation

◆ aligned_read2()

uint16_t aligned_read2 ( const unsigned char *  ptr)
inline

Definition at line 157 of file wordaccess.h.

◆ aligned_read4()

uint32_t aligned_read4 ( const unsigned char *  ptr)
inline

◆ aligned_write2()

template<typename T >
void aligned_write2 ( unsigned char *  ptr,
value 
)
inline

Definition at line 184 of file wordaccess.h.

◆ aligned_write4()

template<typename T >
void aligned_write4 ( unsigned char *  ptr,
value 
)
inline

◆ do_aligned_read()

template<typename UINT >
UINT do_aligned_read ( const unsigned char *  ptr)
inline

Definition at line 89 of file wordaccess.h.

References alignment_cast(), and do_bswap().

◆ do_aligned_write()

template<typename T , typename UINT >
void do_aligned_write ( unsigned char *  ptr,
value 
)
inline

Definition at line 100 of file wordaccess.h.

References alignment_cast(), AssertEq, AssertRel, and do_bswap().

◆ do_bswap() [1/3]

uint16_t do_bswap ( uint16_t  value)
inline

◆ do_bswap() [2/3]

uint32_t do_bswap ( uint32_t  value)
inline

Definition at line 55 of file wordaccess.h.

◆ do_bswap() [3/3]

uint64_t do_bswap ( uint64_t  value)
inline

Definition at line 68 of file wordaccess.h.

◆ do_unaligned_read()

template<typename UINT >
UINT do_unaligned_read ( const unsigned char *  ptr)
inline

Definition at line 117 of file wordaccess.h.

References do_bswap().

◆ do_unaligned_write()

template<typename T , typename UINT >
void do_unaligned_write ( unsigned char *  ptr,
value 
)
inline

Definition at line 129 of file wordaccess.h.

References AssertEq, AssertRel, and do_bswap().

◆ unaligned_read2()

uint16_t unaligned_read2 ( const unsigned char *  ptr)
inline

◆ unaligned_read4()

uint32_t unaligned_read4 ( const unsigned char *  ptr)
inline

◆ unaligned_write2()

template<typename T >
void unaligned_write2 ( unsigned char *  ptr,
value 
)
inline

◆ unaligned_write4()

template<typename T >
void unaligned_write4 ( unsigned char *  ptr,
value 
)
inline

Definition at line 177 of file wordaccess.h.

Referenced by Glass::BItem_wr::set_block_given_by(), and setint4().