diff --git a/README.html b/README.html index 0bc0d50..10bb3ed 100644 --- a/README.html +++ b/README.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +stdint.h
Memory allocation of structures can be facilitated by using the @@ -399,8 +399,8 @@ The maximum string size for the filenames is 4096 characters.
All calls to TREXIO are thread-safe. @@ -408,10 +408,10 @@ TREXIO front end is modular, which simplifies impelementation of new back ends.
12 | 'Invalid exit code' | + +|
TREXIO_NUM_ALREADY_EXISTS |
+13 | +'This variable already exists' | +
TREXIO has several back ends:
@@ -643,8 +652,8 @@ lines that correspond to the TREXIO_JSON
back end (not implemented
Every time a reading function is called, the data is read from the @@ -672,8 +681,8 @@ concurrent programs, the behavior is not specified.
trexio_s
is the the main type for TREXIO files, visible to the users
@@ -705,8 +714,8 @@ TREXIO files will have as a first argument the TREXIO file handle.
Polymorphism of the trexio_t
type is handled by ensuring that the
@@ -725,8 +734,8 @@ corresponding types for all back ends can be safely casted to
trexio_open
creates a new TREXIO file or opens existing one.
@@ -888,8 +897,8 @@ should tend to avoid renaming the .txt
data files.
trexio_close
closes an existing trexio_t
file.
@@ -988,8 +997,8 @@ output:
Consider the following block of trex.json
:
@@ -1150,8 +1159,8 @@ TREXIO supports I/O with single or double precision for integer and floating poi
This section concerns API calls related to dimensioning variables. @@ -1220,8 +1229,8 @@ This section concerns API calls related to dimensioning variables.
The C
templates that correspond to each of the abovementioned functions can be found below.
@@ -1410,8 +1419,8 @@ The basic (non-suffixed) API call on dimensioning variables deals with single pr
The Fortran
templates that provide an access to the C
API calls from Fortran.
@@ -1498,8 +1507,8 @@ These templates are based on the use of iso_c_binding
. Pointers hav
This section concerns API calls related to datasets. @@ -1568,8 +1577,8 @@ This section concerns API calls related to datasets.
The C templates that correspond to each of the abovementioned functions can be found below. @@ -1827,8 +1836,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
The Fortran
templates that provide an access to the C
API calls from Fortran
.
@@ -1915,8 +1924,8 @@ These templates are based on the use of iso_c_binding
. Pointers hav
The function below adapts the original C-based trexio_open
for Fortran.
@@ -1945,7 +1954,7 @@ Note, that Fortran interface calls the main TREXIO
API, which is wr
#define $GROUP$_GROUP_NAME "$group$" @@ -340,8 +340,8 @@ for the JavaScript code in this tag.
typedef struct trexio_hdf5_s { @@ -356,8 +356,8 @@ for the JavaScript code in this tag.
trexio_exit_code
@@ -440,8 +440,8 @@ for the JavaScript code in this tag.
trexio_exit_code @@ -515,9 +515,8 @@ for the JavaScript code in this tag. if (infile_num != num) { if (infile_num != 0) { - printf("%lu -> %lu %s \n", num, infile_num, - "This variable already exists. Overwriting it is not supported"); - return TREXIO_FAILURE; + + return TREXIO_NUM_ALREADY_EXISTS; } else { @@ -564,8 +563,8 @@ for the JavaScript code in this tag.
trexio_exit_code
@@ -699,7 +698,7 @@ for the JavaScript code in this tag.
$group_num$
attribute$group_dset$
dataset$group_num$
attribute$group_dset$
datasetThe "file" produced by the text back end is a directory with one @@ -359,8 +359,8 @@ The file is written when closed, or when the flush function is called.
typedef struct $group$_s { @@ -376,8 +376,8 @@ The file is written when closed, or when the flush function is called.
typedef struct rdm_s { @@ -403,8 +403,8 @@ The file is written when closed, or when the flush function is called.
trexio_exit_code
@@ -511,8 +511,8 @@ The file is written when closed, or when the flush function is called.
trexio_exit_code
@@ -536,8 +536,8 @@ The file is written when closed, or when the flush function is called.
$group$_t* @@ -632,7 +632,7 @@ trexio_text_read_$group$ (trexio_text_t*return NULL; } - rc = fscanf(f, "%lu\n", &($group$->dims_$group_dset$[i])); + rc = fscanf(f, "%" SCNu64 "\n", &($group$->dims_$group_dset$[i])); assert(!(rc != 1)); if (rc != 1) { FREE(buffer); @@ -658,7 +658,7 @@ trexio_text_read_$group$ (trexio_text_t*return NULL; } - rc = fscanf(f, "%lu", &($group$->$group_num$)); + rc = fscanf(f, "%" SCNu64 "", &($group$->$group_num$)); assert(!(rc != 1)); if (rc != 1) { FREE(buffer); @@ -734,8 +734,8 @@ trexio_text_read_$group$ (trexio_text_t*
trexio_exit_code @@ -764,14 +764,14 @@ trexio_text_read_$group$ (trexio_text_t*if ($group$->rank_$group_dset$ != 0) size_$group_dset$ = 1; for (unsigned int i=0; i<$group$->rank_$group_dset$; ++i){ - fprintf(f, "dims_$group_dset$ %u %lu\n", i, $group$->dims_$group_dset$[i]); + fprintf(f, "dims_$group_dset$ %u %" PRIu64 "\n", i, $group$->dims_$group_dset$[i]); size_$group_dset$ *= $group$->dims_$group_dset$[i]; } // END REPEAT GROUP_DSET // START REPEAT GROUP_NUM - fprintf(f, "$group_num$ %lu\n", $group$->$group_num$); + fprintf(f, "$group_num$ %" PRIu64 "\n", $group$->$group_num$); // END REPEAT GROUP_NUM /* Write arrays */ @@ -793,8 +793,8 @@ trexio_text_read_$group$ (trexio_text_t*
Memory is allocated when reading. The following function frees memory. @@ -835,8 +835,8 @@ Memory is allocated when reading. The following function frees memory.
$group_num$
attribute$group_num$
attributetrexio_exit_code
@@ -898,8 +898,8 @@ Memory is allocated when reading. The following function frees memory.
$group_dset$
dataset$group_dset$
dataset
The group_dset
array is assumed allocated with the appropriate size.
@@ -996,12 +996,12 @@ The group_dset
array is assumed allocated with the appropriate size
rdm_t* trexio_text_read_rdm(trexio_text_t* const file); @@ -1055,7 +1055,7 @@ Thegroup_dset
array is assumed allocated with the appropriate size assert (rc == 1); assert (strcmp(buffer, "dim_one_e") == 0); - rc = fscanf(f, "%lu", &(rdm->dim_one_e)); + rc = fscanf(f, "%" SCNu64 "", &(rdm->dim_one_e)); assert (rc == 1); /* Allocate arrays */ @@ -1109,8 +1109,8 @@ Thegroup_dset
array is assumed allocated with the appropriate size
trexio_exit_code trexio_text_flush_rdm(trexio_text_t* const file); @@ -1133,7 +1133,7 @@ Thegroup_dset
array is assumed allocated with the appropriate size fseek(f, 0L, SEEK_SET); /* Write the dimensioning variables */ - fprintf(f, "num %lu\n", rdm->dim_one_e); + fprintf(f, "num %" PRIu64 "\n", rdm->dim_one_e); /* Write arrays */ fprintf(f, "one_e\n"); @@ -1153,8 +1153,8 @@ Thegroup_dset
array is assumed allocated with the appropriate size
Memory is allocated when reading. The followig function frees memory. @@ -1199,8 +1199,8 @@ Memory is allocated when reading. The followig function frees memory.
The one_e
array is assumed allocated with the appropriate size.
@@ -1266,8 +1266,8 @@ The one_e
array is assumed allocated with the appropriate size.
two_e
is a sparse data structure, which can be too large to fit
@@ -1375,7 +1375,7 @@ file for each sparse float structure.