31 for (
int i = 0; i < ndims;
buffer->len *= shape[i++])
33 buffer->readonly = readonly;
34 buffer->itemsize =
sizeof(T);
37 buffer->shape =
new Py_ssize_t[ndims];
38 for (
int i = 0; i < ndims; ++i)
39 buffer->shape[i] = shape[i];
41 buffer->strides =
new Py_ssize_t[ndims];
42 buffer->strides[0] =
sizeof(T);
43 for (
int i = 1; i <
buffer->ndim; i++)
C interface for the ICON Community Interface.
const char * get_format_char< int >()
const char * get_format_char()
void fill_buffer(Py_buffer *buffer, void *mem, int *shape, int ndims, int readonly=1)
const char * get_format_char< double >()
const char * get_format_char< float >()
const char * get_format_char< int8_t >()