Revision 2c47b73,
870 bytes
checked in by Hal Finkel <hfinkel@…>, 6 years ago
(diff) |
more work on adding SZ (latest version)
|
-
Property mode set to
100644
|
Rev | Line | |
---|
[2c47b73] | 1 | /** |
---|
| 2 | * @file DynamicIntArray.h |
---|
| 3 | * @author Sheng Di |
---|
| 4 | * @date April, 2016 |
---|
| 5 | * @brief Header file for Dynamic Int Array. |
---|
| 6 | * (C) 2016 by Mathematics and Computer Science (MCS), Argonne National Laboratory. |
---|
| 7 | * See COPYRIGHT in top-level directory. |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | #ifndef _DynamicIntArray_H |
---|
| 11 | #define _DynamicIntArray_H |
---|
| 12 | |
---|
| 13 | #ifdef __cplusplus |
---|
| 14 | extern "C" { |
---|
| 15 | #endif |
---|
| 16 | |
---|
| 17 | #include <stdio.h> |
---|
| 18 | typedef struct DynamicIntArray |
---|
| 19 | { |
---|
| 20 | unsigned char* array; //char* (one byte) is enough, don't have to be int* |
---|
| 21 | size_t size; |
---|
| 22 | size_t capacity; |
---|
| 23 | } DynamicIntArray; |
---|
| 24 | |
---|
| 25 | void new_DIA(DynamicIntArray **dia, size_t cap); |
---|
| 26 | void convertDIAtoInts(DynamicIntArray *dia, unsigned char **data); |
---|
| 27 | void free_DIA(DynamicIntArray *dia); |
---|
| 28 | int getDIA_Data(DynamicIntArray *dia, size_t pos); |
---|
| 29 | void addDIA_Data(DynamicIntArray *dia, int value); |
---|
| 30 | |
---|
| 31 | #ifdef __cplusplus |
---|
| 32 | } |
---|
| 33 | #endif |
---|
| 34 | |
---|
| 35 | #endif /* ----- #ifndef _DynamicIntArray_H ----- */ |
---|
Note: See
TracBrowser
for help on using the repository browser.