86 #define BBARRAY_HEADER_SIZE (sizeof (BBArray) - sizeof (BBSize))
89 #define BBARRAY_MAX_DATASIZE (BBSIZE_MAX - sizeof (BBArray))
93 #define BBARRAY_MAX_LENGTH (BBARRAY_MAX_DATASIZE)
112 #define BBARRAY_SIZE_CALC(size, num_dims) \
113 (BBARRAY_HEADER_SIZE + (num_dims) * sizeof (int) + (size))
122 #define BBARRAY_SIZE(arr) BBARRAY_SIZE_CALC((arr)->size, (arr)->dims)
134 #define BBARRAY_DATAPTR_CALC(arr, num_dims) \
136 ((char *)(arr) + BBARRAY_HEADER_SIZE + (num_dims) * sizeof (int)) \
149 #define BBARRAY_DATAPTR(arr) BBARRAY_DATAPTR_CALC((arr), (arr)->dims)
171 #define BBARRAY_ALLOC(size, dims, flags) \
175 BBARRAY_SIZE_CALC((size), (dims)), \
189 #define BBARRAY_TYPE_ISCOMPLEX(type) \
191 (type)[0] == ':' || \
192 (type)[0] == '$' || \
206 #define BBARRAY_ISCOMPLEX(arr) BBARRAY_TYPE_ISCOMPLEX((arr)->type)
235 #define BBNULLARRAY (&bbEmptyArray)
414 BBArray* bb_array_alloc(
const char *type, BBSize dims,
const BBSize *lens);
434 BBArray* bb_array_alloc1d(
const char *type, BBSize len);
455 void bb_array_init(
BBArray *arr);
512 BBArray* bbArrayFromData(
const char *type,
BBInt length,
const void *data);
520 BBArray* bbArrayCastFromObject(
const BBObject *obj,
const char *typetag);
609 void* bbArrayToCArray(
const BBArray *arr);
645 #define BBARRAY_NOTFOUND (-1)
811 #ifndef BB_DISABLE_DEPRECATED
813 # define BBARRAYSIZE(q,n) (20+(n)*sizeof(int)+(q))
814 # define BBARRAYDATA(p,n) ((void*)((char*)(p)+20+(n)*sizeof(int)))
816 #endif // !BB_DISABLE_DEPRECATED
820 #endif // BLITZ_ARRAY_H