Skip to content

Commit 1abb4b2

Browse files
committed
update C documentation so breathe can extract more docs
1 parent edd7541 commit 1abb4b2

File tree

4 files changed

+115
-32
lines changed

4 files changed

+115
-32
lines changed

docs/source/client_api.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,21 @@ quickly navigate to each subsection:
2626
.. doxygentypedef:: perr_t
2727
:project: PDC
2828

29+
.. doxygentypedef:: pdc_var_type_t
30+
:project: PDC
31+
32+
.. doxygenenum:: pdc_prop_type_t
33+
:project: PDC
34+
35+
.. doxygenenum:: pdc_region_partition_t
36+
:project: PDC
37+
38+
.. doxygenenum:: pdc_lifetime_t
39+
:project: PDC
40+
41+
.. doxygenenum:: pdc_prop_type_t
42+
:project: PDC
43+
2944
.. _client_api_layer:
3045

3146
**5.2.** PDC Layer
@@ -70,6 +85,9 @@ quickly navigate to each subsection:
7085
.. doxygenfunction:: PDCobj_close
7186
:project: PDC
7287

88+
.. doxygenfunction:: PDCprop_obj_dup
89+
:project: PDC
90+
7391
.. _client_api_regions:
7492

7593
**5.6.** Regions

src/api/pdc_obj/include/pdc_obj.h

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,37 @@
3131
/* Public Typedefs */
3232
/*******************/
3333
typedef enum { PDC_NA = 0, PDC_READ = 1, PDC_WRITE = 2 } pdc_access_t;
34+
35+
/**
36+
* @brief Partitioning strategy for PDC regions of an object.
37+
*
38+
* An abstract region of an object can be partitioned in four ways.
39+
*
40+
* The default is PDC_REGION_STATIC.
41+
*/
3442
typedef enum {
35-
PDC_OBJ_STATIC = 0,
36-
PDC_REGION_STATIC = 1,
43+
/// @brief Object static partitioning.
44+
/// Input transfer requests are directly packed with a one-to-one mapping.
45+
/// The target data server is determined at object create/open time.
46+
PDC_OBJ_STATIC = 0,
47+
48+
/// @brief Region static partitioning.
49+
/// Each region is equally partitioned across all data servers.
50+
PDC_REGION_STATIC = 1,
51+
52+
/// @brief Region dynamic partitioning.
53+
/// The metadata server selects the data server dynamically based on
54+
/// current system load to balance region assignments.
3755
PDC_REGION_DYNAMIC = 2,
38-
PDC_REGION_LOCAL = 3
56+
57+
/// @brief Node-local region placement.
58+
/// The metadata server selects a data server on the same node (or closest)
59+
/// to the client transferring the request.
60+
PDC_REGION_LOCAL = 3
3961
} pdc_region_partition_t;
62+
4063
typedef enum { PDC_BLOCK = 0, PDC_NOBLOCK = 1 } pdc_lock_mode_t;
64+
4165
typedef enum {
4266
PDC_CONSISTENCY_DEFAULT = 0,
4367
PDC_CONSISTENCY_POSIX = 1,

src/api/pdc_obj/include/pdc_prop.h

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
struct pdc_obj_prop {
3535
pdcid_t obj_prop_id;
3636
size_t ndim;
37-
uint64_t * dims;
37+
uint64_t *dims;
3838
pdc_var_type_t type;
3939
pdc_region_partition_t region_partition;
4040
pdc_consistency_t consistency;
@@ -43,7 +43,18 @@ struct pdc_obj_prop {
4343
/*******************/
4444
/* Public Typedefs */
4545
/*******************/
46-
typedef enum { PDC_CONT_CREATE = 0, PDC_OBJ_CREATE } pdc_prop_type_t;
46+
47+
/**
48+
* @brief Type of a PDC property
49+
*
50+
* Indicates what the property is used for when creating objects or containers.
51+
*/
52+
typedef enum {
53+
/// @brief Property applies to container creation.
54+
PDC_CONT_CREATE = 0,
55+
/// @brief Property applies to object creation.
56+
PDC_OBJ_CREATE
57+
} pdc_prop_type_t;
4758

4859
/*********************/
4960
/* Public Prototypes */
@@ -98,25 +109,4 @@ struct _pdc_cont_prop *PDCcont_prop_get_info(pdcid_t prop_id);
98109
*/
99110
struct pdc_obj_prop *PDCobj_prop_get_info(pdcid_t prop_id);
100111

101-
/**
102-
* Send updated metadata (stored as property) to metadata server
103-
*
104-
* \param obj_id[IN] Object ID
105-
* \param prop_id[IN] Object property
106-
*
107-
* \return Non-negative on success/Negative on failure
108-
*/
109-
perr_t PDCprop_update(pdcid_t obj_id, pdcid_t prop_id);
110-
111-
/**
112-
* **********
113-
*
114-
* \param obj_id[IN] Object ID
115-
* \param tag_name [IN] Metadta field name
116-
* \param tag_value [IN] Metadta field value
117-
*
118-
* \return Non-negative on success/Negative on failure
119-
*/
120-
perr_t PDCtag_get(pdcid_t obj_id, char *tag_name, void *tag_value);
121-
122112
#endif /* PDC_PROP_H */

src/commons/include/pdc_public.h

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,18 @@
3333
/*******************/
3434
/* Public Typedefs */
3535
/*******************/
36-
typedef int perr_t;
36+
37+
/**
38+
* @brief PDC error
39+
*
40+
* Negative indicates error success otherwise
41+
*/
42+
typedef int perr_t;
43+
/**
44+
* @brief PDC ID
45+
*
46+
* 0 indicates error success otherwise
47+
*/
3748
typedef uint64_t pdcid_t;
3849
typedef unsigned long long psize_t;
3950
typedef bool pbool_t;
@@ -42,26 +53,66 @@ typedef int PDC_int_t;
4253
typedef float PDC_float_t;
4354
typedef double PDC_double_t;
4455

56+
/**
57+
* @brief PDC variable types
58+
*
59+
* List of all variable types:
60+
*
61+
* - PDC_UNKNOWN = 0 : error
62+
* - PDC_SHORT = 1 : short types
63+
* - PDC_INT = 2 : integer types (identical to int32_t)
64+
* - PDC_UINT = 3 : unsigned integer types (identical to uint32_t)
65+
* - PDC_LONG = 4 : long types
66+
* - PDC_INT8 = 5 : 8-bit integer types
67+
* - PDC_UINT8 = 6 : 8-bit unsigned integer types
68+
* - PDC_INT16 = 7 : 16-bit integer types
69+
* - PDC_UINT16 = 8 : 16-bit unsigned integer types
70+
* - PDC_INT32 = 9 : 32-bit integer types, already listed as PDC_INT
71+
* - PDC_UINT32 = 10 : 32-bit unsigned integer types
72+
* - PDC_INT64 = 11 : 64-bit integer types
73+
* - PDC_UINT64 = 12 : 64-bit unsigned integer types
74+
* - PDC_FLOAT = 13 : floating-point types
75+
* - PDC_DOUBLE = 14 : double types
76+
* - PDC_CHAR = 15 : character types
77+
* - PDC_STRING = 16 : string types
78+
* - PDC_BOOLEAN = 17 : boolean types
79+
* - PDC_VOID_PTR = 18 : void pointer type
80+
* - PDC_SIZE_T = 19 : size_t type
81+
* - PDC_BULKI = 20 : BULKI type
82+
* - PDC_BULKI_ENT = 21 : BULKI_ENTITY type
83+
* - PDC_TYPE_COUNT = 22 : number of variable types (must be last)
84+
*/
4585
typedef pdc_c_var_type_t pdc_var_type_t;
4686

4787
// FIXME: common data structure should be defined in a group of common header files.
4888
typedef struct pdc_kvtag_t {
49-
char * name;
89+
char *name;
5090
uint32_t size;
5191
int8_t type;
52-
void * value;
92+
void *value;
5393
} pdc_kvtag_t;
5494

55-
typedef enum { PDC_PERSIST, PDC_TRANSIENT } pdc_lifetime_t;
95+
/**
96+
* @brief Lifetime of a PDC container
97+
*
98+
* The default is PDC_PERSIST
99+
*/
100+
typedef enum {
101+
/// @brief The container persists beyond the lifetime of the creating process.
102+
PDC_PERSIST,
103+
/// @brief The container exists only for the duration
104+
/// of the creating process and is deleted when the process exits.
105+
PDC_TRANSIENT
106+
} pdc_lifetime_t;
56107

57108
typedef enum { PDC_SERVER_DEFAULT = 0, PDC_SERVER_PER_CLIENT = 1 } pdc_server_selection_t;
58109

59110
typedef struct pdc_histogram_t {
60111
pdc_var_type_t dtype;
61112
int nbin;
62113
double incr;
63-
double * range;
64-
uint64_t * bin;
114+
double *range;
115+
uint64_t *bin;
65116
} pdc_histogram_t;
66117

67118
#define SUCCEED 0

0 commit comments

Comments
 (0)