Skip to content
Snippets Groups Projects
Commit 08203495 authored by Ali Mohammed's avatar Ali Mohammed
Browse files

maestro accepts mmblayout as an attribute type, reads and sets its default...

maestro accepts mmblayout as an attribute type, reads and sets its default value - parse an irregular_1D mmbLayout from string
parent a0978a63
Branches
Tags
No related merge requests found
...@@ -150,6 +150,15 @@ maestro-attributes: ...@@ -150,6 +150,15 @@ maestro-attributes:
======= =======
>>>>>>> 5b1f05e (add distlayout attributes to maestro-core schema) >>>>>>> 5b1f05e (add distlayout attributes to maestro-core schema)
#FIXME only support now irregular_1D dist layout
- key: "cdo.dist-layout"
type: mmblayout()
required: False
default: NIL
documentation: The CDO data distribution among various
maestro compoenets.
## Lifetime related ## Lifetime related
# - key: "cdo.lifetime" # - key: "cdo.lifetime"
# type: lifetime-interval # type: lifetime-interval
......
...@@ -169,20 +169,6 @@ mstro_status ...@@ -169,20 +169,6 @@ mstro_status
mstro_cdo_attribute_set_isdistributed(mstro_cdo cdo, const char* key); mstro_cdo_attribute_set_isdistributed(mstro_cdo cdo, const char* key);
/* Automaticallly set cdo.isdistributed attributed if the user set any of the
distributed layout attributes */
static inline
mstro_status
mstro_cdo_attribute_set_isdistributed(mstro_cdo cdo, const char* key);
/* Automaticallly set cdo.isdistributed attributed if the user set any of the
distributed layout attributes */
static inline
mstro_status
mstro_cdo_attribute_set_isdistributed(mstro_cdo cdo, const char* key);
/**@} (end of group MSTRO_I_Attributes) */ /**@} (end of group MSTRO_I_Attributes) */
/**@} (end of addtogroup MSTRO_Internal) */ /**@} (end of addtogroup MSTRO_Internal) */
......
...@@ -92,6 +92,9 @@ const char *MSTRO_ATTR_CORE_CDO_ISDISTRIBUTED = ...@@ -92,6 +92,9 @@ const char *MSTRO_ATTR_CORE_CDO_ISDISTRIBUTED =
const char *MSTRO_ATTR_CORE_CDO_DIST_LAYOUT = const char *MSTRO_ATTR_CORE_CDO_DIST_LAYOUT =
".maestro.core.cdo.dist-layout"; ".maestro.core.cdo.dist-layout";
const char *MSTRO_ATTR_CORE_CDO_DIST_LAYOUT =
".maestro.core.cdo.dist-layout";
/* .... */ /* .... */
...@@ -400,6 +403,7 @@ mstro_parse_mmbLayout_irregular_1D(char *str, mmbLayout **dist_layout) { ...@@ -400,6 +403,7 @@ mstro_parse_mmbLayout_irregular_1D(char *str, mmbLayout **dist_layout) {
mstro_status mstro_status
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD
mstro_mmbLayout_parse(const char *str, mmbLayout **dist_layout) mstro_mmbLayout_parse(const char *str, mmbLayout **dist_layout)
{ {
DEBUG("parsing %s, with length %d \n", str, strlen(str)); DEBUG("parsing %s, with length %d \n", str, strlen(str));
...@@ -413,6 +417,11 @@ mstro_mmbLayout_parse(const char *str, mmbLayout **dist_layout) ...@@ -413,6 +417,11 @@ mstro_mmbLayout_parse(const char *str, mmbLayout **dist_layout)
{ {
DEBUG("parsing %s, with length %d \n", str, strlen(str)); DEBUG("parsing %s, with length %d \n", str, strlen(str));
>>>>>>> d47d5987 (mmbLayout on the wire) >>>>>>> d47d5987 (mmbLayout on the wire)
=======
mstro_mmbLayout_parse(const char *str, size_t len, mmbLayout **dist_layout)
{
DEBUG("parsing %s, with length %d \n", str, len);
>>>>>>> 0e38bfb (maestro accepts mmblayout as an attribute type, reads and sets its default value - parse an irregular_1D mmbLayout from string)
if(str==NULL) { if(str==NULL) {
ERR("NULL string, cannot parse as mmbLayout \n"); ERR("NULL string, cannot parse as mmbLayout \n");
return MSTRO_INVARG; return MSTRO_INVARG;
...@@ -431,6 +440,7 @@ mstro_mmbLayout_parse(const char *str, mmbLayout **dist_layout) ...@@ -431,6 +440,7 @@ mstro_mmbLayout_parse(const char *str, mmbLayout **dist_layout)
/*bypass the const char warning here ... working on the string for parsing */ /*bypass the const char warning here ... working on the string for parsing */
char * tmp = strdup(str); char * tmp = strdup(str);
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD <<<<<<< HEAD
return mstro_parse_mmbLayout_irregular_1D(tmp, dist_layout); return mstro_parse_mmbLayout_irregular_1D(tmp, dist_layout);
======= =======
...@@ -439,6 +449,9 @@ mstro_mmbLayout_parse(const char *str, mmbLayout **dist_layout) ...@@ -439,6 +449,9 @@ mstro_mmbLayout_parse(const char *str, mmbLayout **dist_layout)
======= =======
return mstro_parse_mmbLayout_irregular_1D(tmp, dist_layout); return mstro_parse_mmbLayout_irregular_1D(tmp, dist_layout);
>>>>>>> d47d5987 (mmbLayout on the wire) >>>>>>> d47d5987 (mmbLayout on the wire)
=======
return mstro_parse_mmbLayout_irregular_1D(tmp, len, dist_layout);
>>>>>>> 0e38bfb (maestro accepts mmblayout as an attribute type, reads and sets its default value - parse an irregular_1D mmbLayout from string)
} }
mstro_status mstro_status
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment