Yet Another eXchange Tool  0.9.0
Classes | Typedefs | Enumerations | Functions
xt_arithmetic_long.h File Reference
#include <stdbool.h>
#include "xt/xt_core.h"
#include "xt_arithmetic_util.h"
Include dependency graph for xt_arithmetic_long.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Xt_long
 
struct  Xt_tword
 
struct  Xt_idiv
 
struct  Xt_ldiv
 

Typedefs

typedef Xt_long Xt_ulong
 
typedef XT_SHORT Xt_short
 
typedef unsigned XT_SHORT Xt_ushort
 

Enumerations

enum  { xt_int_bits = sizeof (Xt_int) * CHAR_BIT }
 
enum  { xt_hint_bits = xt_int_bits/2 }
 

Functions

static int xlsign (Xt_long x)
 
static Xt_long xi2l (Xt_int a)
 
static Xt_long xlabs (Xt_long a)
 
static Xt_uint xlhi (Xt_long x)
 
static Xt_uint xllo (Xt_long x)
 
static Xt_long xlnegate (Xt_long a, bool negate)
 
static bool xl_is_in_xt_int_range (Xt_long a)
 
static Xt_long xiiadd (Xt_int a, Xt_int b)
 
static Xt_long xliadd (Xt_long a, Xt_int b)
 
static Xt_long xlinc (Xt_long a, bool b)
 
static Xt_long xlladd (Xt_long a, Xt_long b)
 
static Xt_long xiisub (Xt_int a, Xt_int b)
 
static Xt_long xllsub (Xt_long a, Xt_long b)
 
static Xt_long xlisub (Xt_long a, Xt_int b)
 
static Xt_long xilsub (Xt_int a, Xt_long b)
 
static Xt_long xiimul (Xt_int a, Xt_int b)
 
static Xt_uint xthi (Xt_tword x)
 
static Xt_uint xtmid (Xt_tword x)
 
static Xt_uint xtlo (Xt_tword x)
 
static Xt_tword xlimul (Xt_long a, Xt_int b)
 
static Xt_idiv xlidivu (Xt_ulong a, Xt_uint b)
 
static void xdivmnu (Xt_ushort *restrict q, Xt_ushort *restrict r, const Xt_ushort *restrict u, const Xt_ushort *restrict v, int m, int n)
 
static void xl2a (Xt_ushort a[4], Xt_long u)
 
static Xt_long xa2l (Xt_ushort a[4])
 
static Xt_ldiv xlldivu (Xt_ulong u, Xt_ulong v)
 
static Xt_ldiv xtidiv (Xt_tword a, Xt_int b)
 
static Xt_ldiv xlldiv (Xt_long a, Xt_long b)
 
static int xlicmp_gt (Xt_long a, Xt_int b)
 
static int xlicmp_ge (Xt_long a, Xt_int b)
 
static int xlicmp_le (Xt_long a, Xt_int b)
 
static int xlicmp_lt (Xt_long a, Xt_int b)
 
static int xllcmp_eq (Xt_long a, Xt_long b)
 
static int xttcmp_eq (Xt_tword a, Xt_tword b)
 

Detailed Description

Author
Jrg Behrens behre.nosp@m.ns@d.nosp@m.krz.d.nosp@m.e Moritz Hanke hanke.nosp@m.@dkr.nosp@m.z.de Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Definition in file xt_arithmetic_long.h.

Typedef Documentation

◆ Xt_short

typedef XT_SHORT Xt_short

Definition at line 496 of file xt_arithmetic_long.h.

◆ Xt_ulong

typedef Xt_long Xt_ulong

Definition at line 199 of file xt_arithmetic_long.h.

◆ Xt_ushort

typedef unsigned XT_SHORT Xt_ushort

Definition at line 497 of file xt_arithmetic_long.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
xt_int_bits 

Definition at line 58 of file xt_arithmetic_long.h.

◆ anonymous enum

anonymous enum
Enumerator
xt_hint_bits 

Definition at line 336 of file xt_arithmetic_long.h.

Function Documentation

◆ xa2l()

static Xt_long xa2l ( Xt_ushort  a[4])
inlinestatic

Definition at line 613 of file xt_arithmetic_long.h.

Here is the caller graph for this function:

◆ xdivmnu()

static void xdivmnu ( Xt_ushort *restrict  q,
Xt_ushort *restrict  r,
const Xt_ushort *restrict  u,
const Xt_ushort *restrict  v,
int  m,
int  n 
)
inlinestatic

Definition at line 523 of file xt_arithmetic_long.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xi2l()

static Xt_long xi2l ( Xt_int  a)
inlinestatic

Definition at line 212 of file xt_arithmetic_long.h.

Here is the call graph for this function:

◆ xiiadd()

static Xt_long xiiadd ( Xt_int  a,
Xt_int  b 
)
inlinestatic

Definition at line 258 of file xt_arithmetic_long.h.

Here is the call graph for this function:

◆ xiimul()

static Xt_long xiimul ( Xt_int  a,
Xt_int  b 
)
inlinestatic

Definition at line 342 of file xt_arithmetic_long.h.

Here is the caller graph for this function:

◆ xiisub()

static Xt_long xiisub ( Xt_int  a,
Xt_int  b 
)
inlinestatic

Definition at line 297 of file xt_arithmetic_long.h.

Here is the call graph for this function:

◆ xilsub()

static Xt_long xilsub ( Xt_int  a,
Xt_long  b 
)
inlinestatic

Definition at line 327 of file xt_arithmetic_long.h.

Here is the call graph for this function:

◆ xl2a()

static void xl2a ( Xt_ushort  a[4],
Xt_long  u 
)
inlinestatic

Definition at line 604 of file xt_arithmetic_long.h.

Here is the caller graph for this function:

◆ xl_is_in_xt_int_range()

static bool xl_is_in_xt_int_range ( Xt_long  a)
inlinestatic

Definition at line 252 of file xt_arithmetic_long.h.

Here is the call graph for this function:

◆ xlabs()

static Xt_long xlabs ( Xt_long  a)
inlinestatic

Definition at line 220 of file xt_arithmetic_long.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xlhi()

static Xt_uint xlhi ( Xt_long  x)
inlinestatic

Definition at line 230 of file xt_arithmetic_long.h.

◆ xliadd()

static Xt_long xliadd ( Xt_long  a,
Xt_int  b 
)
inlinestatic

Definition at line 268 of file xt_arithmetic_long.h.

Here is the call graph for this function:

◆ xlicmp_ge()

static int xlicmp_ge ( Xt_long  a,
Xt_int  b 
)
inlinestatic
Returns
1 if a >= b or 0 if a < b

Definition at line 763 of file xt_arithmetic_long.h.

Here is the call graph for this function:

◆ xlicmp_gt()

static int xlicmp_gt ( Xt_long  a,
Xt_int  b 
)
inlinestatic
Returns
1 if a > b or 0 if a <= b

Definition at line 751 of file xt_arithmetic_long.h.

Here is the call graph for this function:

◆ xlicmp_le()

static int xlicmp_le ( Xt_long  a,
Xt_int  b 
)
inlinestatic
Returns
1 if a <= b or 0 if a > b

Definition at line 775 of file xt_arithmetic_long.h.

Here is the call graph for this function:

◆ xlicmp_lt()

static int xlicmp_lt ( Xt_long  a,
Xt_int  b 
)
inlinestatic
Returns
1 if a < b or 0 if a >= b

Definition at line 787 of file xt_arithmetic_long.h.

Here is the call graph for this function:

◆ xlidivu()

static Xt_idiv xlidivu ( Xt_ulong  a,
Xt_uint  b 
)
inlinestatic

Definition at line 446 of file xt_arithmetic_long.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xlimul()

static Xt_tword xlimul ( Xt_long  a,
Xt_int  b 
)
inlinestatic

Definition at line 380 of file xt_arithmetic_long.h.

◆ xlinc()

static Xt_long xlinc ( Xt_long  a,
bool  b 
)
inlinestatic

Definition at line 279 of file xt_arithmetic_long.h.

◆ xlisub()

static Xt_long xlisub ( Xt_long  a,
Xt_int  b 
)
inlinestatic

Definition at line 316 of file xt_arithmetic_long.h.

◆ xlladd()

static Xt_long xlladd ( Xt_long  a,
Xt_long  b 
)
inlinestatic

Definition at line 288 of file xt_arithmetic_long.h.

◆ xllcmp_eq()

static int xllcmp_eq ( Xt_long  a,
Xt_long  b 
)
inlinestatic

Definition at line 796 of file xt_arithmetic_long.h.

◆ xlldiv()

static Xt_ldiv xlldiv ( Xt_long  a,
Xt_long  b 
)
inlinestatic

Definition at line 737 of file xt_arithmetic_long.h.

Here is the call graph for this function:

◆ xlldivu()

static Xt_ldiv xlldivu ( Xt_ulong  u,
Xt_ulong  v 
)
inlinestatic

Definition at line 622 of file xt_arithmetic_long.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xllo()

static Xt_uint xllo ( Xt_long  x)
inlinestatic

Definition at line 236 of file xt_arithmetic_long.h.

◆ xllsub()

static Xt_long xllsub ( Xt_long  a,
Xt_long  b 
)
inlinestatic

Definition at line 307 of file xt_arithmetic_long.h.

Here is the caller graph for this function:

◆ xlnegate()

static Xt_long xlnegate ( Xt_long  a,
bool  negate 
)
inlinestatic

Definition at line 242 of file xt_arithmetic_long.h.

Here is the caller graph for this function:

◆ xlsign()

static int xlsign ( Xt_long  x)
inlinestatic
Returns
-1 if x < 0, 1 otherwise

Definition at line 205 of file xt_arithmetic_long.h.

◆ xthi()

static Xt_uint xthi ( Xt_tword  x)
inlinestatic

Definition at line 362 of file xt_arithmetic_long.h.

◆ xtidiv()

static Xt_ldiv xtidiv ( Xt_tword  a,
Xt_int  b 
)
inlinestatic

Definition at line 727 of file xt_arithmetic_long.h.

◆ xtlo()

static Xt_uint xtlo ( Xt_tword  x)
inlinestatic

Definition at line 374 of file xt_arithmetic_long.h.

◆ xtmid()

static Xt_uint xtmid ( Xt_tword  x)
inlinestatic

Definition at line 368 of file xt_arithmetic_long.h.

◆ xttcmp_eq()

static int xttcmp_eq ( Xt_tword  a,
Xt_tword  b 
)
inlinestatic

Definition at line 802 of file xt_arithmetic_long.h.