Skip to content

Commit dab6623

Browse files
UTIL: add parser doc (#934)
1 parent 8ab35ce commit dab6623

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

config/m4/ucx.m4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ AS_IF([test "x$ucx_checked" != "xyes"],[
128128
[AC_DEFINE([UCS_HAVE_PARSER_SET_VALUE_TABLE_PREFIX], [1], [flags for ucs_rcache_get])],
129129
[])
130130
131+
AC_CHECK_MEMBER(ucs_config_parser_t.doc,
132+
[AC_DEFINE([UCS_HAVE_PARSER_CONFIG_DOC], [1], [flags for ucs_rcache_get])],
133+
[],
134+
[#include <ucs/memory/rcache.h>])
131135
],
132136
[
133137
AS_IF([test "x$with_ucx" != "xguess"],

src/utils/ucc_parser.h

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,29 @@ int ucc_config_sprintf_uint_ranged(char *buf, size_t max, const void *src,
268268
ucs_status_t ucc_config_clone_uint_ranged(const void *src, void *dest,
269269
const void *arg);
270270

271-
void ucc_config_release_uint_ranged(void *ptr, const void *arg);
271+
void ucc_config_release_uint_ranged(void *ptr, const void *arg);
272272

273+
#ifdef UCS_HAVE_PARSER_CONFIG_DOC
274+
#define UCC_CONFIG_TYPE_UINT_RANGED \
275+
{ \
276+
ucc_config_sscanf_uint_ranged, ucc_config_sprintf_uint_ranged, \
277+
ucc_config_clone_uint_ranged, ucc_config_release_uint_ranged, \
278+
ucs_config_help_generic, ucs_config_doc_nop, \
279+
"[<munit>-<munit>:[mtype]:value," \
280+
"<munit>-<munit>:[mtype]:value,...,]default_value\n" \
281+
"# value and default_value can be \"auto\"" \
282+
}
283+
284+
#define UCC_CONFIG_TYPE_PIPELINE_PARAMS \
285+
{ \
286+
ucc_config_sscanf_pipeline_params, ucc_config_sprintf_pipeline_params, \
287+
ucc_config_clone_pipeline_params, \
288+
ucc_config_release_pipeline_params, ucs_config_help_generic, \
289+
ucs_config_doc_nop, \
290+
"thresh=<memunit>:fragsize=<memunit>:nfrags=" \
291+
"<uint>:pdepth=<uint>:<ordered/parallel/sequential>" \
292+
}
293+
#else
273294
#define UCC_CONFIG_TYPE_UINT_RANGED \
274295
{ \
275296
ucc_config_sscanf_uint_ranged, ucc_config_sprintf_uint_ranged, \
@@ -289,3 +310,4 @@ void ucc_config_release_uint_ranged(void *ptr, const void *arg);
289310
}
290311

291312
#endif
313+
#endif

0 commit comments

Comments
 (0)