OpenJPH: /build/openjph/src/OpenJPH/src/core/openjph/ojph_arch.h File Reference

OpenJPH Open-source implementation of JPEG2000 Part-15

Loading...
Searching...
No Matches
ojph_arch.h File Reference
`#include <cstdio>`
`#include <cstdint>`
`#include <cmath>`
`#include "ojph_defs.h"`

Go to the source code of this file.

## Namespaces
namespace | ojph

## Macros
#define | OJPH_FORCE_INLINE static inline __attribute__((always_inline))
#define | OJPH_NO_INLINE static __attribute__((noinline))
#define | OJPH_ARCH_UNKNOWN
#define | OJPH_DISABLE_SIMD
#define | OJPH_EXPORT

## Enumerations
enum | : int { ojph::X86_CPU_EXT_LEVEL_GENERIC = 0 , ojph::X86_CPU_EXT_LEVEL_MMX = 1 , ojph::X86_CPU_EXT_LEVEL_SSE = 2 , ojph::X86_CPU_EXT_LEVEL_SSE2 = 3 , ojph::X86_CPU_EXT_LEVEL_SSE3 = 4 , ojph::X86_CPU_EXT_LEVEL_SSSE3 = 5 , ojph::X86_CPU_EXT_LEVEL_SSE41 = 6 , ojph::X86_CPU_EXT_LEVEL_SSE42 = 7 , ojph::X86_CPU_EXT_LEVEL_AVX = 8 , ojph::X86_CPU_EXT_LEVEL_AVX2 = 9 , ojph::X86_CPU_EXT_LEVEL_AVX2FMA = 10 , ojph::X86_CPU_EXT_LEVEL_AVX512 = 11 }
enum | : int { ojph::ARM_CPU_EXT_LEVEL_GENERIC = 0 , ojph::ARM_CPU_EXT_LEVEL_NEON = 1 , ojph::ARM_CPU_EXT_LEVEL_ASIMD = 1 , ojph::ARM_CPU_EXT_LEVEL_SVE = 2 , ojph::ARM_CPU_EXT_LEVEL_SVE2 = 3 }

## Functions
OJPH_EXPORT int | ojph::get_cpu_ext_level ()
static ui32 | ojph::population_count (ui32 val)
static ui32 | ojph::count_leading_zeros (ui32 val)
static ui32 | ojph::count_leading_zeros (ui64 val)
static ui32 | ojph::count_trailing_zeros (ui32 val)
static ui32 | ojph::count_trailing_zeros (ui64 val)
static si32 | ojph::ojph_round (float val)
static si32 | ojph::ojph_trunc (float val)
template<typename T, ui32 N>
size_t | ojph::calc_aligned_size (size_t size)
template<typename T, ui32 N>
T * | ojph::align_ptr (T *ptr)
static bool | ojph::check_if_machine_is_little_endian ()
static ui16 | ojph::swap_bytes_if_be (ui16 t)
static ui16 | ojph::swap_bytes_if_le (ui16 t)
static ui32 | ojph::swap_bytes_if_be (ui32 t)
static ui32 | ojph::swap_bytes_if_le (ui32 t)
static ui64 | ojph::swap_bytes_if_le (ui64 t)
static ui32 | ojph::load_le_ui32 (const ui8 *p)
static ui32 | ojph::load_le_ui16x2 (const ui16 *p)

## Variables
const ui32 | ojph::byte_alignment = 64
const ui32 | ojph::log_byte_alignment = 31 - count_leading_zeros(byte_alignment)
const ui32 | ojph::object_alignment = 8
const bool | ojph::is_machine_little_endian = check_if_machine_is_little_endian()

## Macro Definition Documentation

## ◆ OJPH_ARCH_UNKNOWN

#define OJPH_ARCH_UNKNOWN

Definition at line 100 of file ojph_arch.h.

## ◆ OJPH_DISABLE_SIMD

#define OJPH_DISABLE_SIMD

Definition at line 109 of file ojph_arch.h.

## ◆ OJPH_EXPORT

#define OJPH_EXPORT

Definition at line 135 of file ojph_arch.h.

## ◆ OJPH_FORCE_INLINE

#define OJPH_FORCE_INLINE static inline __attribute__((always_inline))

Definition at line 74 of file ojph_arch.h.

## ◆ OJPH_NO_INLINE

#define OJPH_NO_INLINE static __attribute__((noinline))

Definition at line 75 of file ojph_arch.h.