Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

Commit

Permalink
Better layout for docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescAlted committed Aug 31, 2019
1 parent 9b5249f commit f88f0bd
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions caterva/caterva.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
/**
* @brief Formats to store #caterva_array_t data.
*/

typedef enum {
CATERVA_STORAGE_BLOSC,
//!< Indicates that data is stored using a Blosc superchunk.
Expand All @@ -46,7 +45,6 @@ typedef enum {
* In parenthesis it is shown the default value used internally when a \c NULL value is passed to the
* constructor.
*/

typedef struct {
void *(*alloc)(size_t);
//!< The allocation memory function used internally (malloc)
Expand All @@ -62,7 +60,6 @@ typedef struct {
/**
* @brief A dimensions vector that can represent shapes or points
*/

typedef struct {
int64_t dims[CATERVA_MAXDIM];
//!< The size of each dimension
Expand All @@ -74,7 +71,6 @@ typedef struct {
/**
* @brief Default caterva dimensions vector
*/

static const caterva_dims_t CATERVA_DIMS_DEFAULTS = {
.dims = {1, 1, 1, 1, 1, 1, 1, 1},
.ndim = 1
Expand All @@ -87,7 +83,6 @@ static const caterva_dims_t CATERVA_DIMS_DEFAULTS = {
* When a block is needed, it is copied into this cache. In this way, if the same block is needed
* again afterwards, it is not necessary to recover it because it is already in the cache.
*/

struct part_cache_s {
uint8_t *data;
//!< Pointer to the block data.
Expand All @@ -99,7 +94,6 @@ struct part_cache_s {
/**
* @brief A multidimensional container that allows compressed data.
*/

typedef struct {
caterva_ctx_t *ctx;
//!< Caterva context
Expand Down Expand Up @@ -147,7 +141,6 @@ typedef struct {
*
* @return A pointer to the new caterva context. \p NULL is returned if this fails.
*/

caterva_ctx_t *caterva_new_ctx(void *(*all)(size_t), void (*free)(void *), blosc2_cparams cparams, blosc2_dparams dparams);


Expand All @@ -158,7 +151,6 @@ caterva_ctx_t *caterva_new_ctx(void *(*all)(size_t), void (*free)(void *), blosc
*
* @return An error code
*/

int caterva_free_ctx(caterva_ctx_t *ctx);


Expand All @@ -172,7 +164,6 @@ int caterva_free_ctx(caterva_ctx_t *ctx);
*
* @return The caterva dimensions vector created
*/

caterva_dims_t caterva_new_dims(const int64_t *dims, int8_t ndim);


Expand All @@ -194,7 +185,6 @@ caterva_dims_t caterva_new_dims(const int64_t *dims, int8_t ndim);
*
* @return A pointer to the empty caterva container created
*/

caterva_array_t *caterva_empty_array(caterva_ctx_t *ctx, blosc2_frame *fr, caterva_dims_t *pshape);


Expand All @@ -205,7 +195,6 @@ caterva_array_t *caterva_empty_array(caterva_ctx_t *ctx, blosc2_frame *fr, cater
*
* @return An error code
*/

int caterva_free_array(caterva_array_t *carr);


Expand All @@ -220,7 +209,6 @@ int caterva_free_array(caterva_array_t *carr);
*
* @return An error code
*/

int caterva_append(caterva_array_t *carr, void *part, int64_t partsize);


Expand All @@ -233,7 +221,6 @@ int caterva_append(caterva_array_t *carr, void *part, int64_t partsize);
*
* @return A pointer to the caterva container read from disk
*/

caterva_array_t *caterva_from_file(caterva_ctx_t *ctx, const char *filename);


Expand All @@ -246,7 +233,6 @@ caterva_array_t *caterva_from_file(caterva_ctx_t *ctx, const char *filename);
*
* @return An error code
*/

int caterva_from_buffer(caterva_array_t *dest, caterva_dims_t *shape, void *src);


Expand All @@ -259,8 +245,6 @@ int caterva_from_buffer(caterva_array_t *dest, caterva_dims_t *shape, void *src)
*
* @return An error code
*/


int caterva_to_buffer(caterva_array_t *src, void *dest);


Expand All @@ -273,7 +257,6 @@ int caterva_to_buffer(caterva_array_t *src, void *dest);
* @param stop The coordinates where the slice will end
* @return An error code
*/

int caterva_get_slice(caterva_array_t *dest, caterva_array_t *src, caterva_dims_t *start, caterva_dims_t *stop);


Expand All @@ -288,7 +271,6 @@ int caterva_get_slice(caterva_array_t *dest, caterva_array_t *src, caterva_dims_
*
* @return An error code
*/

int caterva_repart(caterva_array_t *dest, caterva_array_t *src);


Expand All @@ -301,7 +283,6 @@ int caterva_repart(caterva_array_t *dest, caterva_array_t *src);
*
* @return An error code
*/

int caterva_squeeze(caterva_array_t *src);


Expand All @@ -315,7 +296,6 @@ int caterva_squeeze(caterva_array_t *src);
* @param d_pshape The partition shape of the buffer
* @return An error code
*/

int caterva_get_slice_buffer(void *dest, caterva_array_t *src, caterva_dims_t *start,
caterva_dims_t *stop, caterva_dims_t *d_pshape);

Expand All @@ -337,7 +317,6 @@ int caterva_get_slice_buffer(void *dest, caterva_array_t *src, caterva_dims_t *s
*
* @return An error code
*/

int caterva_get_slice_buffer_no_copy(void **dest, caterva_array_t *src, caterva_dims_t *start,
caterva_dims_t *stop, caterva_dims_t *d_pshape);

Expand All @@ -354,7 +333,6 @@ int caterva_get_slice_buffer_no_copy(void **dest, caterva_array_t *src, caterva_
*
* @return An error code
*/

int caterva_set_slice_buffer(caterva_array_t *dest, void *src, caterva_dims_t *start,
caterva_dims_t *stop);

Expand All @@ -369,17 +347,16 @@ int caterva_set_slice_buffer(caterva_array_t *dest, void *src, caterva_dims_t *s
*
* @return An error code
*/

int caterva_update_shape(caterva_array_t *src, caterva_dims_t *shape);


/**
* @brief Get the shape of a caterva array
*
* @param src pointer to the container from which the partition shape will be obtained
*
* @return The partition shape of the caterva array
*/

caterva_dims_t caterva_get_shape(caterva_array_t *src);


Expand All @@ -390,9 +367,9 @@ caterva_dims_t caterva_get_shape(caterva_array_t *src);
*
* @return The partition shape of the caterva array
*/

caterva_dims_t caterva_get_pshape(caterva_array_t *src);


/**
* @brief Make a copy of the container data.
*
Expand All @@ -403,7 +380,6 @@ caterva_dims_t caterva_get_pshape(caterva_array_t *src);
*
* @return An error code.
*/

int caterva_copy(caterva_array_t *dest, caterva_array_t *src);


Expand Down

0 comments on commit f88f0bd

Please sign in to comment.