#include "./Cast.h"
#include "./Cmp.h"
#include "./c90/StdInt.h"
Go to the source code of this file.
|
| #define | ae2f_BitToByteCount(bitc) |
| | Calculate proper byte size with bit count.
|
| #define | _ae2f_BitVecFilled(len, vec_t) |
| | Generates the vector filled in 1.
|
| #define | ae2f_BitVecFilled(len) |
| | Generates the vector filled in 1.
|
| #define | _ae2f_BitVecGetRanged(vector, start, end, vec_t) |
| | Gets the bits of [vector] between index of [start] and [end].
|
| #define | ae2f_BitVecGetRanged(vector, start, end) |
| | Gets the bits of [vector] between index of [start] and [end].
It will normalise the values of [start] and [end] by switching them.
|
| #define | ae2f_BitVecGet(vector, idx) |
| | Gets a bit of [vector] from index of [idx].
|
| #define | _ae2f_BitVecSetRanged(vector, start, end, val, vec_t) |
| | Sets the bits of [vector] from index of [start] and [end] by [val].
|
| #define | ae2f_BitVecSetRanged(vector, start, end, val) |
| | Sets the bits of [vector] from index of [start] and [end] by [val].
It will normalise the values of [start] and [end] by switching them.
|
| #define | ae2f_BitVecSet(vector, idx, val) |
| | Sets a bit of [vector] from index of [idx] by [val].
|
| #define | ae2f_BitVecSizeDefName(t) |
| | Gets the vec's last index where the flag set to 1.
|
|
| typedef uint_least8_t | ae2f_BitVecI_t |
| | The pre-defined index type for Bit vector.
|
- Author
- ae2f
- Date
- 2025-02-01
- Copyright
- Copyright (c) 2025
Definition in file BitVec.h.
◆ _ae2f_BitVecFilled
| #define _ae2f_BitVecFilled |
( |
| len, |
|
|
| vec_t ) |
Value:
vec_t, \
(sizeof(vec_t) << 3) == (len) \
1))
#define ae2f_static_cast(t, v)
static_cast for C++
Generates the vector filled in 1.
- Parameters
-
| len | The length of the filled vector. |
- Template Parameters
-
| vec_t | The integer data type. |
Definition at line 30 of file BitVec.h.
◆ _ae2f_BitVecGetRanged
| #define _ae2f_BitVecGetRanged |
( |
| vector, |
|
|
| start, |
|
|
| end, |
|
|
| vec_t ) |
Value:
#define _ae2f_BitVecFilled(len, vec_t)
Generates the vector filled in 1.
Gets the bits of [vector] between index of [start] and [end].
- Parameters
-
| vector | {vec_t} The target for operation. |
| start | {ae2f_Macro_BitVecI_t} The starting index. |
| end | {ae2f_Macro_BitVecI_t} The ending index. |
- Template Parameters
-
| vec_t | The integer data type. |
- Warning
- [start] greater than [end] may cause undefined behaviour.
Definition at line 50 of file BitVec.h.
◆ _ae2f_BitVecSetRanged
| #define _ae2f_BitVecSetRanged |
( |
| vector, |
|
|
| start, |
|
|
| end, |
|
|
| val, |
|
|
| vec_t ) |
Value:
Sets the bits of [vector] from index of [start] and [end] by [val].
- Parameters
-
| vector | {vec_t} The target for operation. |
| start | {ae2f_Macro_BitVecI_t} The starting index. |
| end | {ae2f_Macro_BitVecI_t} The ending index. |
| val | {vec_t} The value to set. |
- Template Parameters
-
| vec_t | The integer data type. |
- Warning
- [start] greater than [end] may cause undefined behaviour.
Definition at line 80 of file BitVec.h.
◆ ae2f_BitToByteCount
| #define ae2f_BitToByteCount |
( |
| bitc | ) |
|
Value:(((bitc) >> 3) + !!((bitc) & 7))
Calculate proper byte size with bit count.
Definition at line 21 of file BitVec.h.
◆ ae2f_BitVecFilled
| #define ae2f_BitVecFilled |
( |
| len | ) |
|
Value:
Generates the vector filled in 1.
- Parameters
-
| len | {ae2f_Macro_BitVecI_t} The length of the filled vector. |
Definition at line 40 of file BitVec.h.
◆ ae2f_BitVecGet
| #define ae2f_BitVecGet |
( |
| vector, |
|
|
| idx ) |
Value:
#define ae2f_BitVecGetRanged(vector, start, end)
Gets the bits of [vector] between index of [start] and [end]. It will normalise the values of [start...
Gets a bit of [vector] from index of [idx].
- Parameters
-
| vector | {size_t} The target for operation. |
| idx | {ae2f_Macro_BitVecI_t} The wanted index for searching. |
- See also
- ae2f_Macro_BitVec_GetRanged
Definition at line 69 of file BitVec.h.
◆ ae2f_BitVecGetRanged
| #define ae2f_BitVecGetRanged |
( |
| vector, |
|
|
| start, |
|
|
| end ) |
Value:
#define _ae2f_BitVecGetRanged(vector, start, end, vec_t)
Gets the bits of [vector] between index of [start] and [end].
#define ae2f_CmpGetGt(a, b)
#define ae2f_CmpGetLs(a, b)
Gets the bits of [vector] between index of [start] and [end].
It will normalise the values of [start] and [end] by switching them.
- Parameters
-
| vector | {size_t} The target for operation. |
| start | {ae2f_Macro_BitVecI_t} The starting index. |
| end | {ae2f_Macro_BitVecI_t} The ending index. |
- See also
- _ae2f_Macro_BitVec_GetRanged
Definition at line 60 of file BitVec.h.
◆ ae2f_BitVecSet
| #define ae2f_BitVecSet |
( |
| vector, |
|
|
| idx, |
|
|
| val ) |
Value:
#define ae2f_BitVecSetRanged(vector, start, end, val)
Sets the bits of [vector] from index of [start] and [end] by [val]. It will normalise the values of ...
Sets a bit of [vector] from index of [idx] by [val].
- Parameters
-
| vector | {size_t} The target for operation. |
| idx | {bool} The wanted index for searching. |
- See also
- ae2f_Macro_BitVec_GetRanged
Definition at line 101 of file BitVec.h.
◆ ae2f_BitVecSetRanged
| #define ae2f_BitVecSetRanged |
( |
| vector, |
|
|
| start, |
|
|
| end, |
|
|
| val ) |
Value:
#define ae2f_BitVecFilled(len)
Generates the vector filled in 1.
#define _ae2f_BitVecSetRanged(vector, start, end, val, vec_t)
Sets the bits of [vector] from index of [start] and [end] by [val].
#define ae2f_CmpDiff(a, b)
Sets the bits of [vector] from index of [start] and [end] by [val].
It will normalise the values of [start] and [end] by switching them.
- Parameters
-
| vector | {vec_t} The target for operation. |
| start | {ae2f_Macro_BitVecI_t} The starting index. |
| end | {ae2f_Macro_BitVecI_t} The ending index. |
| val | {size_t} The value to set. |
Definition at line 91 of file BitVec.h.
◆ ae2f_BitVecSizeDefName
| #define ae2f_BitVecSizeDefName |
( |
| t | ) |
|
Value:ae2f_BitVecSize_##t##_func
Gets the vec's last index where the flag set to 1.
- Template Parameters
-
- Parameters
-
Definition at line 108 of file BitVec.h.
◆ ae2f_BitVecI_t
The pre-defined index type for Bit vector.
Definition at line 25 of file BitVec.h.