MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
types.h File Reference
#include <cmath>
#include <cstdint>
#include <limits>
#include <ostream>
#include <type_traits>
#include <half.hpp>
Include dependency graph for types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mim
 

Macros

#define HALF_ROUND_STYLE   1
 
#define HALF_ROUND_TIES_TO_EVEN   1
 
#define MIM_1_8_16_32_64(m)
 
#define MIM_8_16_32_64(m)
 
#define MIM_16_32_64(m)
 
#define CODE2(i)
 
#define CODE3(i)
 

Typedefs

Width to Signed/Unsigned/Float
template<int w>
using mim::w2u = typename detail::w2u_<w>::type
 
template<int w>
using mim::w2s = typename detail::w2s_<w>::type
 
template<int w>
using mim::w2f = typename detail::w2f_<w>::type
 

Functions

rem
half mim::rem (half a, half b)
 
float mim::rem (float a, float b)
 
double mim::rem (double a, double b)
 
long double mim::rem (long double a, long double b)
 

Aliases for some Base Types

#define CODE1(i)
 
using mim::s8 = int8_t
 
using mim::u8 = uint8_t
 
using mim::s16 = int16_t
 
using mim::u16 = uint16_t
 
using mim::s32 = int32_t
 
using mim::u32 = uint32_t
 
using mim::s64 = int64_t
 
using mim::u64 = uint64_t
 
using mim::u1 = bool
 
using mim::f16 = half
 
using mim::f32 = float
 
using mim::f64 = double
 
using mim::level_t = u64
 
using mim::nat_t = u64
 
using mim::node_t = u8
 
using mim::flags_t = u64
 
using mim::plugin_t = u64
 
using mim::tag_t = u8
 
using mim::sub_t = u8
 

User-Defined Literals

#define CODE4(i)
 
constexpr s8 mim::operator""_s8 (unsigned long long int s)
 
constexpr u8 mim::operator""_u8 (unsigned long long int u)
 
constexpr s16 mim::operator""_s16 (unsigned long long int s)
 
constexpr u16 mim::operator""_u16 (unsigned long long int u)
 
constexpr s32 mim::operator""_s32 (unsigned long long int s)
 
constexpr u32 mim::operator""_u32 (unsigned long long int u)
 
constexpr s64 mim::operator""_s64 (unsigned long long int s)
 
constexpr u64 mim::operator""_u64 (unsigned long long int u)
 
constexpr size_t mim::operator""_s (unsigned long long int i)
 A size_t literal. Use 0_s to disambiguate 0 from nullptr.
 
constexpr nat_t mim::operator""_n (unsigned long long int i)
 
f16 mim::operator""_f16 (long double d)
 
constexpr f32 mim::operator""_f32 (long double d)
 
constexpr f64 mim::operator""_f64 (long double d)
 

Macro Definition Documentation

◆ CODE1

#define CODE1 ( i)
Value:
using s ## i = int ## i ##_t; \
using u ## i = uint ## i ##_t;

Definition at line 31 of file types.h.

◆ CODE2

#define CODE2 ( i)
Value:
template<> struct w2u_<i> { using type = u ## i; }; \
template<> struct w2s_<i> { using type = s ## i; };

Definition at line 58 of file types.h.

◆ CODE3

#define CODE3 ( i)
Value:
template<> struct w2f_<i> { using type = f ## i; };

Definition at line 64 of file types.h.

◆ CODE4

#define CODE4 ( i)
Value:
constexpr s ## i operator"" _s ## i(unsigned long long int s) { return s ## i(s); } \
constexpr u ## i operator"" _u ## i(unsigned long long int u) { return u ## i(u); }

Definition at line 79 of file types.h.

◆ HALF_ROUND_STYLE

#define HALF_ROUND_STYLE   1

Definition at line 14 of file types.h.

◆ HALF_ROUND_TIES_TO_EVEN

#define HALF_ROUND_TIES_TO_EVEN   1

Definition at line 15 of file types.h.

◆ MIM_16_32_64

#define MIM_16_32_64 ( m)
Value:
m(16) m(32) m(64)

Definition at line 26 of file types.h.

◆ MIM_1_8_16_32_64

#define MIM_1_8_16_32_64 ( m)
Value:
m(1) m(8) m(16) m(32) m(64)

Definition at line 24 of file types.h.

◆ MIM_8_16_32_64

#define MIM_8_16_32_64 ( m)
Value:
m(8) m(16) m(32) m(64)

Definition at line 25 of file types.h.