LibT2FS
0.1
C API for accessing TEngine data in memory.
Loading...
Searching...
No Matches
array.h
Go to the documentation of this file.
1
/* This file is part of LibT2FS.
2
*
3
* LibT2FS is free software: you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License as published by
5
* the Free Software Foundation, either version 3 of the License, or
6
* (at your option) any later version.
7
*
8
* LibT2FS is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <https://www.gnu.org/licenses/>.
15
*/
16
17
#ifndef H_T2FS_ARRAY
18
#define H_T2FS_ARRAY
19
20
#include "
t2fs.h
"
21
#include "
common.h
"
22
23
typedef
struct
s_T2FSArray
{
24
uint32_t
size
;
25
uint32_t
count
;
26
void
*
data
;
27
uint8_t
isValid
;
28
}
T2FSArray
;
29
30
31
void
32
t2fs_array_init
(
T2FSArray
*array);
33
34
int
35
t2fs_array_set_node
(
T2FSNode
*node,
T2FSArray
*array);
36
37
// https://en.wikipedia.org/wiki/AOS_vs_SOA
38
// https://en.wikipedia.org/wiki/Interleaving_(data)
39
// TODO look into if all the compressed arrays are interleaved, that
40
// would make sense.. and then we don't need to define whether an
41
// array is interleaved or not in the schema anymore.
42
// the given array needs to be set and valid
43
int
44
t2fs_array_deinterleave
(
T2FSArray
*array);
45
46
47
#endif
t2fs_array_set_node
int t2fs_array_set_node(T2FSNode *node, T2FSArray *array)
t2fs_array_init
void t2fs_array_init(T2FSArray *array)
T2FSArray
struct s_T2FSArray T2FSArray
t2fs_array_deinterleave
int t2fs_array_deinterleave(T2FSArray *array)
common.h
s_T2FSArray
Definition
array.h:23
s_T2FSArray::count
uint32_t count
Definition
array.h:25
s_T2FSArray::data
void * data
Definition
array.h:26
s_T2FSArray::isValid
uint8_t isValid
Definition
array.h:27
s_T2FSArray::size
uint32_t size
Definition
array.h:24
t2fs.h
T2FSNode
struct s_T2FSNode T2FSNode
This is the core object to describe a path inside the tree.
Definition
t2fs.h:110
inc
array.h
Generated by
1.16.1