52 return col * rows + row;
67 return gp_vec_ins(self, col * rows, len * rows);
82 return gp_vec_del(self, col * rows, len * rows);
A compiler dependent macros.
#define GP_WUR
Expands to warn_unused_result attribute when supported by the compiler.
static void * gp_matrix_new(size_t cols, size_t rows, size_t unit)
Allocates a matrix.
void * gp_matrix_rows_ins(void *self, size_t cols, size_t rows, size_t row, size_t len)
Inserts len rowss at the offset row into the matrix.
static void gp_matrix_free(void *self)
Frees the matrix.
static void * gp_matrix_cols_del(void *self, size_t rows, size_t col, size_t len)
Deletes len columns at the offset col from the matrix.
static void * gp_matrix_cols_ins(void *self, size_t rows, size_t col, size_t len)
Inserts len columns at the offset col into the matrix.
static size_t gp_matrix_idx(size_t rows, size_t col, size_t row)
Returns an index into the vector that holds the matrix data.
void * gp_matrix_rows_del(void *self, size_t cols, size_t rows, size_t row, size_t len)
Deletes len rows at the offset col from the matrix.
Vector a growable and shrinkable array.
void * gp_vec_del(void *self, size_t off, size_t len)
Deletes a range from the vector.
void * gp_vec_new(size_t len, size_t unit)
Allocates a new vector.
void * gp_vec_ins(void *self, size_t off, size_t len)
Insert a gap into the vec of new elements, reallocating the underlying memory if more capacity is nee...
void gp_vec_free(void *self)
Frees the vector.