ae2f_docs
Loading...
Searching...
No Matches
scale.h File Reference

Kind of single linked list where only last one could be resized. More...

#include <ae2f/c90/StdInt.h>
#include "../vec.auto.h"
#include <assert.h>

Go to the source code of this file.

Classes

struct  x_scale

Macros

#define SCALE_HEADER_SIZE    ((size_t)(sizeof(x_scale) + sizeof(size_t)))
#define get_scale_header_from_vec(h_alloc)
#define get_first_scale_from_vec(h_alloc)
#define get_last_scale_from_vec(h_alloc)
#define get_buf_from_scale(h_alloc, c_scale)
#define get_buf_from_scale2(buf_T, h_alloc, c_scale)
#define get_nxt_from_scale(h_alloc, c_scale)
#define get_prv_from_scale(h_alloc, c_scale)

Typedefs

typedef struct x_scale x_scale
typedef x_scale *ae2f_restrict h_scale_t

Detailed Description

Kind of single linked list where only last one could be resized.

Definition in file scale.h.

Macro Definition Documentation

◆ get_buf_from_scale

#define get_buf_from_scale ( h_alloc,
c_scale )
Value:
(ae2f_expected((h_alloc)->m_p) \
? (void* ae2f_restrict)(((uintptr_t)(h_alloc)->m_p) + ((uintptr_t)(c_scale).m_buf)) \
: ((void* ae2f_restrict)ae2f_NIL))
#define ae2f_restrict
Keyword as restrict on C99.
Definition cc.h:81
#define ae2f_expected(a)
expectes a as true.
Definition cc.h:184

Definition at line 34 of file scale.h.

◆ get_buf_from_scale2

#define get_buf_from_scale2 ( buf_T,
h_alloc,
c_scale )
Value:
((buf_T* ae2f_restrict)get_buf_from_scale(h_alloc, c_scale))

Definition at line 39 of file scale.h.

◆ get_first_scale_from_vec

#define get_first_scale_from_vec ( h_alloc)
Value:
((h_scale_t)(get_scale_header_from_vec(h_alloc) + 1))

Definition at line 29 of file scale.h.

◆ get_last_scale_from_vec

#define get_last_scale_from_vec ( h_alloc)
Value:
((h_scale_t)( (uintptr_t)(*get_scale_header_from_vec(h_alloc)) + (uintptr_t)((h_alloc)->m_p) ))

Definition at line 31 of file scale.h.

◆ get_nxt_from_scale

#define get_nxt_from_scale ( h_alloc,
c_scale )
Value:
(x_scale* ae2f_restrict)(((uintptr_t)(h_alloc)->m_p) + ((uintptr_t)(c_scale).m_nxt))

Definition at line 42 of file scale.h.

◆ get_prv_from_scale

#define get_prv_from_scale ( h_alloc,
c_scale )
Value:
(x_scale* ae2f_restrict)(((uintptr_t)(h_alloc)->m_p) + ((uintptr_t)(c_scale).m_prv))

Definition at line 45 of file scale.h.

◆ get_scale_header_from_vec

#define get_scale_header_from_vec ( h_alloc)
Value:
((size_t* ae2f_restrict)((h_alloc)->m_p))

Definition at line 28 of file scale.h.

◆ SCALE_HEADER_SIZE

#define SCALE_HEADER_SIZE    ((size_t)(sizeof(x_scale) + sizeof(size_t)))

Definition at line 25 of file scale.h.

Typedef Documentation

◆ h_scale_t

typedef x_scale* ae2f_restrict h_scale_t

Definition at line 15 of file scale.h.

◆ x_scale

typedef struct x_scale x_scale

Definition at line 14 of file scale.h.