diff --git a/README.html b/README.html index 27f8d22..2f2223a 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 @@ -400,8 +400,8 @@ The maximum string size for the filenames is 4096 characters.
All calls to TREXIO are thread-safe. @@ -409,10 +409,10 @@ TREXIO front end is modular, which simplifies implementation of new back ends.
%24.16e |
+||||
$group_dset_dtype_default$ |
+Default datatype of the dataset [C] | +double/int32_t |
+||
$group_dset_dtype_single$ |
-Single precision type of the dataset [C] | -float |
+Single precision datatype of the dataset [C] | +float/int32_t |
$group_dset_dtype_double$ |
-Double precision type of the dataset [C] | -double |
+Double precision datatype of the dataset [C] | +double/int64_t |
+
$default_prec$ |
+Default precision for read/write without suffix [C] | +64/32 |
+||
$group_dset_f_dtype_default$ |
+Default datatype of the dataset [Fortran] | +real(8)/integer(4) |
||
$group_dset_f_dtype_single$ |
-Single precision type of the dataset [Fortran] | -real(4) |
+Single precision datatype of the dataset [Fortran] | +real(4)/integer(4) |
$group_dset_f_dtype_double$ |
-Double precision type of the dataset [Fortran] | -real(8) |
+Double precision datatype of the dataset [Fortran] | +real(8)/integer(8) |
The C
templates that correspond to each of the abovementioned
@@ -1506,8 +1524,8 @@ precision (see Table above).
The Fortran
templates that provide an access to the C
API calls from Fortran.
@@ -1593,8 +1611,8 @@ These templates are based on the use of iso_c_binding
. Pointers hav
This section concerns API calls related to datasets. @@ -1663,8 +1681,8 @@ This section concerns API calls related to datasets.
The C templates that correspond to each of the abovementioned functions can be found below. @@ -1876,18 +1894,18 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
trexio_exit_code -trexio_read_$group$_$group_dset$ (trexio_t* const file, $group_dset_dtype_double$* const $group_dset$) +trexio_read_$group$_$group_dset$ (trexio_t* const file, $group_dset_dtype_default$* const $group_dset$) { - return trexio_read_$group$_$group_dset$_64(file, $group_dset$); + return trexio_read_$group$_$group_dset$_$default_prec$(file, $group_dset$); }
trexio_exit_code -trexio_write_$group$_$group_dset$ (trexio_t* const file, const $group_dset_dtype_double$* $group_dset$) +trexio_write_$group$_$group_dset$ (trexio_t* const file, const $group_dset_dtype_default$* $group_dset$) { - return trexio_write_$group$_$group_dset$_64(file, $group_dset$); + return trexio_write_$group$_$group_dset$_$default_prec$(file, $group_dset$); }
The Fortran
templates that provide an access to the C
API calls from Fortran
.
@@ -1979,7 +1997,7 @@ These templates are based on the use of iso_c_binding
. Pointers hav
integer function trexio_write_$group$_$group_dset$ (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file
- $group_dset_f_dtype_double$, intent(in) :: dset$group_dset_f_dims$
+ $group_dset_f_dtype_default$, intent(in) :: dset$group_dset_f_dims$
end function trexio_write_$group$_$group_dset$
end interface
@@ -1990,7 +2008,7 @@ These templates are based on the use of iso_c_binding
. Pointers hav
integer function trexio_read_$group$_$group_dset$ (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding
integer(8), intent(in), value :: trex_file
- $group_dset_f_dtype_double$, intent(out) :: dset$group_dset_f_dims$
+ $group_dset_f_dtype_default$, intent(out) :: dset$group_dset_f_dims$
end function trexio_read_$group$_$group_dset$
end interface
@@ -2010,8 +2028,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.
@@ -2040,7 +2058,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
@@ -563,8 +563,8 @@ for the JavaScript code in this tag.
trexio_exit_code
@@ -698,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 @@ -436,10 +436,6 @@ The file is written when closed, or when the flush function is called. char file_name[TREXIO_MAX_FILENAME_LENGTH]; - if (file_name == NULL) { - return TREXIO_ALLOCATION_FAILED; - } - strncpy (file_name, file->file_name, TREXIO_MAX_FILENAME_LENGTH); strncat (file_name, lock_file_name, TREXIO_MAX_FILENAME_LENGTH-strlen(lock_file_name)); @@ -509,8 +505,8 @@ The file is written when closed, or when the flush function is called.
trexio_exit_code
@@ -534,8 +530,8 @@ The file is written when closed, or when the flush function is called.
$group$_t* @@ -558,11 +554,6 @@ trexio_text_read_$group$ (trexio_text_t*Build the file name */ const char* $group$_file_name = "/$group$.txt"; - if ($group$->file_name == NULL) { - FREE($group$); - return NULL; - } - strncpy ($group$->file_name, file->parent.file_name, TREXIO_MAX_FILENAME_LENGTH); strncat ($group$->file_name, $group$_file_name, TREXIO_MAX_FILENAME_LENGTH-strlen($group$_file_name)); @@ -706,8 +697,8 @@ trexio_text_read_$group$ (trexio_text_t*
trexio_exit_code @@ -766,8 +757,8 @@ trexio_text_read_$group$ (trexio_text_t*
Memory is allocated when reading. The following function frees memory. @@ -803,8 +794,8 @@ Memory is allocated when reading. The following function frees memory.
$group_num$
attribute$group_num$
attributetrexio_exit_code
@@ -866,8 +857,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.
@@ -964,12 +955,12 @@ The group_dset
array is assumed allocated with the appropriate size
rdm_t* trexio_text_read_rdm(trexio_text_t* const file);
@@ -1064,8 +1055,8 @@ The group_dset
array is assumed allocated with the appropriate size
trexio_exit_code trexio_text_flush_rdm(trexio_text_t* const file);
@@ -1108,8 +1099,8 @@ The group_dset
array is assumed allocated with the appropriate size
Memory is allocated when reading. The followig function frees memory. @@ -1145,8 +1136,8 @@ Memory is allocated when reading. The followig function frees memory.
The one_e
array is assumed allocated with the appropriate size.
@@ -1212,8 +1203,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
@@ -1321,7 +1312,7 @@ file for each sparse float structure.