interface
- integer(c_int32_t) function trexio_write_$group_num$_64 (trex_file, num) bind(C)
+ integer(trexio_exit_code) function trexio_write_$group_num$_64 (trex_file, num) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
$group_num_f_dtype_double$, intent(in), value :: num
end function trexio_write_$group_num$_64
@@ -2344,8 +2366,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_read_$group_num$_64 (trex_file, num) bind(C)
+ integer(trexio_exit_code) function trexio_read_$group_num$_64 (trex_file, num) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
$group_num_f_dtype_double$, intent(out) :: num
end function trexio_read_$group_num$_64
@@ -2355,8 +2378,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_write_$group_num$_32 (trex_file, num) bind(C)
+ integer(trexio_exit_code) function trexio_write_$group_num$_32 (trex_file, num) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
$group_num_f_dtype_single$, intent(in), value :: num
end function trexio_write_$group_num$_32
@@ -2366,8 +2390,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_read_$group_num$_32 (trex_file, num) bind(C)
+ integer(trexio_exit_code) function trexio_read_$group_num$_32 (trex_file, num) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
$group_num_f_dtype_single$, intent(out) :: num
end function trexio_read_$group_num$_32
@@ -2377,8 +2402,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_write_$group_num$ (trex_file, num) bind(C)
+ integer(trexio_exit_code) function trexio_write_$group_num$ (trex_file, num) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
$group_num_f_dtype_default$, intent(in), value :: num
end function trexio_write_$group_num$
@@ -2388,8 +2414,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_read_$group_num$ (trex_file, num) bind(C)
+ integer(trexio_exit_code) function trexio_read_$group_num$ (trex_file, num) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
$group_num_f_dtype_default$, intent(out) :: num
end function trexio_read_$group_num$
@@ -2399,8 +2426,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_has_$group_num$ (trex_file) bind(C)
+ integer(trexio_exit_code) function trexio_has_$group_num$ (trex_file) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
end function trexio_has_$group_num$
end interface
@@ -2409,8 +2437,8 @@ These templates are based on the use of iso_c_binding
. Pointers hav
-
-
3.2.4 Python templates for front end
+
+
3.2.4 Python templates for front end
def write_$group_num$(trexio_file, num_w: $group_num_py_dtype$) -> None:
@@ -2495,12 +2523,12 @@ These templates are based on the use of iso_c_binding
. Pointers hav
-
-
3.3 Templates for front end has/read/write a dataset of numerical data
+
+
3.3 Templates for front end has/read/write a dataset of numerical data
-
-
3.3.1 Introduction
+
+
3.3.1 Introduction
This section concerns API calls related to datasets.
@@ -2582,24 +2610,24 @@ This section concerns API calls related to datasets.
-
-
3.3.2 C templates for front end
+
+
3.3.2 C templates for front end
The C templates that correspond to each of the abovementioned functions can be found below.
First parameter is the TREXIO
file handle. Second parameter is the variable to be written/read
to/from the TREXIO
file (except for trexio_has_
functions).
Suffixes _32
and _64
correspond to API calls dealing with single and double precision, respectively.
-The basic (non-suffixed) API call on datasets deals with double precision (see Table above).
+The basic (non-suffixed) API call on datasets deals with real(cdouble) (see Table above).
-
-
3.3.2.1 Function declarations
+
+
3.3.2.1 Function declarations
-
-
3.3.2.2 Source code for double precision functions
+
+
3.3.2.2 Source code for double precision functions
trexio_exit_code
@@ -2762,8 +2790,8 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
-
-
3.3.2.3 Source code for single precision functions
+
+
3.3.2.3 Source code for single precision functions
trexio_exit_code
@@ -2868,7 +2896,7 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
$group_dset_dtype_double$* $group_dset$_64 = CALLOC(dim_size, $group_dset_dtype_double$);
if ($group_dset$_64 == NULL) return TREXIO_ALLOCATION_FAILED;
- /* A type conversion from single precision to double reqired since back end only accepts 64-bit data */
+ /* A type conversion from single precision to double required since back end only accepts 64-bit data */
if ($is_index$) {
for (uint64_t i=0; i<dim_size; ++i){
$group_dset$_64[i] = ($group_dset_dtype_double$) $group_dset$[i] - ($group_dset_dtype_double$) 1;
@@ -2914,11 +2942,11 @@ The basic (non-suffixed) API call on datasets deals with double precision (see T
-
-
3.3.2.4 Source code for memory-safe functions
+
+
3.3.2.4 Source code for memory-safe functions
-
trexio_exit_code rc;
+trexio_exit_code rc;
int64_t $group_dset_dim$ = 0;
/* Error handling for this call is added by the generator */
@@ -3074,8 +3102,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &($group_dset_dim$));
-
-
3.3.2.5 Source code for default functions
+
+
3.3.2.5 Source code for default functions
trexio_exit_code
@@ -3150,8 +3178,8 @@ rc = trexio_read_$group_dset_dim$_64(file, &($group_dset_dim$));
-
-
3.3.3 Fortran templates for front end
+
+
3.3.3 Fortran templates for front end
The Fortran
templates that provide an access to the C
API calls from Fortran
.
@@ -3160,8 +3188,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_write_$group_dset$_64 (trex_file, dset) bind(C)
+ integer(trexio_exit_code) function trexio_write_$group_dset$_64 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
$group_dset_f_dtype_double$, intent(in) :: dset$group_dset_f_dims$
end function trexio_write_$group_dset$_64
@@ -3171,8 +3200,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_read_$group_dset$_64 (trex_file, dset) bind(C)
+ integer(trexio_exit_code) function trexio_read_$group_dset$_64 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
$group_dset_f_dtype_double$, intent(out) :: dset$group_dset_f_dims$
end function trexio_read_$group_dset$_64
@@ -3182,8 +3212,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_write_$group_dset$_32 (trex_file, dset) bind(C)
+ integer(trexio_exit_code) function trexio_write_$group_dset$_32 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
$group_dset_f_dtype_single$, intent(in) :: dset$group_dset_f_dims$
end function trexio_write_$group_dset$_32
@@ -3193,8 +3224,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_read_$group_dset$_32 (trex_file, dset) bind(C)
+ integer(trexio_exit_code) function trexio_read_$group_dset$_32 (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
$group_dset_f_dtype_single$, intent(out) :: dset$group_dset_f_dims$
end function trexio_read_$group_dset$_32
@@ -3204,8 +3236,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_write_$group_dset$ (trex_file, dset) bind(C)
+ integer(trexio_exit_code) function trexio_write_$group_dset$ (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
$group_dset_f_dtype_default$, intent(in) :: dset$group_dset_f_dims$
end function trexio_write_$group_dset$
@@ -3215,8 +3248,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_read_$group_dset$ (trex_file, dset) bind(C)
+ integer(trexio_exit_code) function trexio_read_$group_dset$ (trex_file, dset) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
$group_dset_f_dtype_default$, intent(out) :: dset$group_dset_f_dims$
end function trexio_read_$group_dset$
@@ -3226,8 +3260,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_has_$group_dset$ (trex_file) bind(C)
+ integer(trexio_exit_code) function trexio_has_$group_dset$ (trex_file) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
end function trexio_has_$group_dset$
end interface
@@ -3236,8 +3271,8 @@ These templates are based on the use of iso_c_binding
. Pointers hav
-
-
3.3.4 Python templates for front end
+
+
3.3.4 Python templates for front end
def write_$group_dset$(trexio_file, dset_w) -> None:
@@ -3432,12 +3467,12 @@ These templates are based on the use of iso_c_binding
. Pointers hav
-
-
3.4 Templates for front end has/read/write a dataset of sparse data
+
+
3.4 Templates for front end has/read/write a dataset of sparse data
-
-
3.4.1 Introduction
+
+
3.4.1 Introduction
Sparse data structures are used typically for large tensors such as
@@ -3598,16 +3633,16 @@ This section concerns API calls related to sparse data structures.
-
-
3.4.2 C templates for front end
+
+
3.4.2 C templates for front end
-
-
3.4.2.1 Function declarations
+
+
3.4.2.1 Function declarations
-
-
3.4.2.2 Source code for default functions
+
+
3.4.2.2 Source code for default functions
trexio_exit_code trexio_read_safe_$group_dset$(trexio_t* const file,
@@ -3882,8 +3917,8 @@ This section concerns API calls related to sparse data structures.
-
-
3.4.3 Fortran templates for front end
+
+
3.4.3 Fortran templates for front end
The Fortran
templates that provide an access to the C
API calls from Fortran
.
@@ -3892,10 +3927,11 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_write_$group_dset$ (trex_file, &
- offset_file, buffer_size, &
- index_sparse, value_sparse) bind(C)
+ integer(trexio_exit_code) function trexio_write_$group_dset$ (trex_file, &
+ offset_file, buffer_size, &
+ index_sparse, value_sparse) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
integer(c_int64_t), intent(in), value :: offset_file
integer(c_int64_t), intent(in), value :: buffer_size
@@ -3905,11 +3941,12 @@ These templates are based on the use of iso_c_binding
. Pointers hav
end interface
interface
- integer(c_int32_t) function trexio_write_safe_$group_dset$ (trex_file, &
- offset_file, buffer_size, &
- index_sparse, index_size, &
- value_sparse, value_size) bind(C)
+ integer(trexio_exit_code) function trexio_write_safe_$group_dset$ (trex_file, &
+ offset_file, buffer_size, &
+ index_sparse, index_size, &
+ value_sparse, value_size) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
integer(c_int64_t), intent(in), value :: offset_file
integer(c_int64_t), intent(in), value :: buffer_size
@@ -3924,10 +3961,11 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_read_$group_dset$ (trex_file, &
- offset_file, buffer_size, &
- index_sparse, value_sparse) bind(C)
+ integer(trexio_exit_code) function trexio_read_$group_dset$ (trex_file, &
+ offset_file, buffer_size, &
+ index_sparse, value_sparse) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
integer(c_int64_t), intent(in), value :: offset_file
integer(c_int64_t), intent(inout) :: buffer_size
@@ -3937,11 +3975,12 @@ These templates are based on the use of iso_c_binding
. Pointers hav
end interface
interface
- integer(c_int32_t) function trexio_read_safe_$group_dset$ (trex_file, &
- offset_file, buffer_size, &
- index_sparse, index_size, &
- value_sparse, value_size) bind(C)
+ integer(trexio_exit_code) function trexio_read_safe_$group_dset$ (trex_file, &
+ offset_file, buffer_size, &
+ index_sparse, index_size, &
+ value_sparse, value_size) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
integer(c_int64_t), intent(in), value :: offset_file
integer(c_int64_t), intent(inout) :: buffer_size
@@ -3956,11 +3995,12 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_read_$group_dset$_size (trex_file, &
- size_max) bind(C)
+ integer(trexio_exit_code) function trexio_read_$group_dset$_size (trex_file, &
+ size_max) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
- integer(c_int64_t), intent(out) :: size_max
+ integer(c_int64_t), intent(out) :: size_max
end function trexio_read_$group_dset$_size
end interface
@@ -3968,8 +4008,9 @@ These templates are based on the use of
iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_has_$group_dset$ (trex_file) bind(C)
+ integer(trexio_exit_code) function trexio_has_$group_dset$ (trex_file) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
end function trexio_has_$group_dset$
end interface
@@ -3978,8 +4019,8 @@ These templates are based on the use of iso_c_binding
. Pointers hav
-
-
3.4.4 Python templates for front end
+
+
3.4.4 Python templates for front end
def write_$group_dset$(trexio_file: File, offset_file: int, buffer_size: int, indices: list, values: list) -> None:
@@ -4200,12 +4241,12 @@ These templates are based on the use of iso_c_binding
. Pointers hav
-
-
3.5 Templates for front end has/read/write a dataset of strings
+
+
3.5 Templates for front end has/read/write a dataset of strings
-
-
3.5.1 Introduction
+
+
3.5.1 Introduction
This section concerns API calls related to datasets of strings.
@@ -4245,8 +4286,8 @@ This section concerns API calls related to datasets of strings.
-
-
3.5.2 C templates for front end
+
+
3.5.2 C templates for front end
First parameter is the TREXIO
file handle. Second parameter is the variable to be written/read
@@ -4254,12 +4295,12 @@ to/from the TREXIO
file (except for trexio_has_
functi
-
-
3.5.2.1 Function declarations
+
+
3.5.2.1 Function declarations
-
-
3.5.2.2 Source code for default functions
+
+
3.5.2.2 Source code for default functions
trexio_exit_code
@@ -4509,8 +4550,8 @@ to/from the TREXIO
file (except for trexio_has_
functi
-
-
3.5.3 Fortran templates for front end
+
+
3.5.3 Fortran templates for front end
The Fortran
templates that provide an access to the C
API calls from Fortran
.
@@ -4519,8 +4560,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_write_$group_dset$_low (trex_file, dset, max_str_len) bind(C)
+ integer(trexio_exit_code) function trexio_write_$group_dset$_low (trex_file, dset, max_str_len) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
character(kind=c_char), intent(in) :: dset(*)
integer(c_int32_t), intent(in), value :: max_str_len
@@ -4531,8 +4573,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_read_$group_dset$_low (trex_file, dset, max_str_len) bind(C)
+ integer(trexio_exit_code) function trexio_read_$group_dset$_low (trex_file, dset, max_str_len) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
character(kind=c_char), intent(out) :: dset(*)
integer(c_int32_t), intent(in), value :: max_str_len
@@ -4543,8 +4586,9 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_has_$group_dset$ (trex_file) bind(C)
+ integer(trexio_exit_code) function trexio_has_$group_dset$ (trex_file) bind(C)
use, intrinsic :: iso_c_binding
+ import
integer(c_int64_t), intent(in), value :: trex_file
end function trexio_has_$group_dset$
end interface
@@ -4552,15 +4596,15 @@ These templates are based on the use of iso_c_binding
. Pointers hav
-
integer function trexio_read_$group_dset$ (trex_file, dset, max_str_len)
+integer(trexio_exit_code) function trexio_read_$group_dset$ (trex_file, dset, max_str_len)
implicit none
- integer(8), intent(in), value :: trex_file
- integer(4), intent(in), value :: max_str_len
+ integer(c_int64_t), intent(in), value :: trex_file
+ integer(c_int32_t), intent(in), value :: max_str_len
character(len=*), intent(inout) :: dset(*)
character, allocatable :: str_compiled(:)
- integer(8) :: $group_dset_dim$
- integer :: rc
+ integer(c_int64_t) :: $group_dset_dim$
+ integer(trexio_exit_code) :: rc
rc = trexio_read_$group_dset_dim$_64(trex_file, $group_dset_dim$)
if (rc /= TREXIO_SUCCESS) trexio_read_$group_dset$ = rc
@@ -4582,15 +4626,15 @@ These templates are based on the use of iso_c_binding
. Pointers hav
-
integer function trexio_write_$group_dset$ (trex_file, dset, max_str_len)
+integer(trexio_exit_code) function trexio_write_$group_dset$ (trex_file, dset, max_str_len)
implicit none
- integer(8), intent(in), value :: trex_file
- integer(4), intent(in), value :: max_str_len
- character(len=*), intent(in) :: dset(*)
+ integer(c_int64_t), intent(in), value :: trex_file
+ integer(c_int32_t), intent(in), value :: max_str_len
+ character(len=*), intent(in) :: dset(*)
character(len=:), allocatable :: str_compiled
- integer(8) :: $group_dset_dim$
- integer :: rc
+ integer(c_int64_t) :: $group_dset_dim$
+ integer(trexio_exit_code) :: rc
rc = trexio_read_$group_dset_dim$_64(trex_file, $group_dset_dim$)
if (rc /= TREXIO_SUCCESS) then
@@ -4606,8 +4650,8 @@ These templates are based on the use of iso_c_binding
. Pointers hav
-
-
3.5.4 Python templates for front end
+
+
3.5.4 Python templates for front end
def write_$group_dset$(trexio_file, dset_w: list) -> None:
@@ -4723,12 +4767,12 @@ These templates are based on the use of iso_c_binding
. Pointers hav
-
-
3.6 Templates for front end has/read/write a single string attribute
+
+
3.6 Templates for front end has/read/write a single string attribute
-
-
3.6.1 Introduction
+
+
3.6.1 Introduction
This section concerns API calls related to string attributes.
@@ -4768,16 +4812,16 @@ This section concerns API calls related to string attributes.
-
-
3.6.2 C templates for front end
+
+
3.6.2 C templates for front end
-
-
3.6.2.1 Function declarations
+
+
3.6.2.1 Function declarations
-
-
3.6.2.2 Source code for default functions
+
+
3.6.2.2 Source code for default functions
trexio_exit_code
@@ -4881,8 +4925,8 @@ This section concerns API calls related to string attributes.
-
-
3.6.3 Fortran templates for front end
+
+
3.6.3 Fortran templates for front end
The Fortran
templates that provide an access to the C
API calls from Fortran.
@@ -4892,10 +4936,11 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_write_$group_str$_c (trex_file, str, max_str_len) &
- bind(C, name="trexio_write_$group_str$")
+ integer(trexio_exit_code) function trexio_write_$group_str$_c (trex_file, str, max_str_len) &
+ bind(C, name="trexio_write_$group_str$")
use, intrinsic :: iso_c_binding
- integer(c_int64_t), intent(in), value :: trex_file
+ import
+ integer(trexio_t), intent(in), value :: trex_file
character(kind=c_char), intent(in) :: str(*)
integer(c_int32_t), intent(in), value :: max_str_len
end function trexio_write_$group_str$_c
@@ -4905,12 +4950,13 @@ These templates are based on the use of iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_read_$group_str$_c (trex_file, str, max_str_len) &
- bind(C, name="trexio_read_$group_str$")
+ integer(trexio_exit_code) function trexio_read_$group_str$_c (trex_file, str, max_str_len) &
+ bind(C, name="trexio_read_$group_str$")
use, intrinsic :: iso_c_binding
- integer(c_int64_t), intent(in), value :: trex_file
+ import
+ integer(trexio_t), intent(in), value :: trex_file
character(kind=c_char), intent(out) :: str(*)
- integer(c_int32_t), intent(in), value :: max_str_len
+ integer(c_int32_t), intent(in), value :: max_str_len
end function trexio_read_$group_str$_c
end interface
@@ -4918,19 +4964,20 @@ These templates are based on the use of
iso_c_binding
. Pointers hav
interface
- integer(c_int32_t) function trexio_has_$group_str$ (trex_file) bind(C)
+ integer(trexio_exit_code) function trexio_has_$group_str$ (trex_file) bind(C)
use, intrinsic :: iso_c_binding
- integer(c_int64_t), intent(in), value :: trex_file
+ import
+ integer(trexio_t), intent(in), value :: trex_file
end function trexio_has_$group_str$
end interface
-
integer function trexio_read_$group_str$ (trex_file, str, max_str_len)
+integer(trexio_exit_code) function trexio_read_$group_str$ (trex_file, str, max_str_len)
implicit none
- integer(8), intent(in), value :: trex_file
- integer(4), intent(in), value :: max_str_len
+ integer(trexio_t), intent(in), value :: trex_file
+ integer(c_int32_t), intent(in), value :: max_str_len
character, intent(out) :: str(*)
trexio_read_$group_str$ = trexio_read_$group_str$_c(trex_file, str, max_str_len)
@@ -4940,12 +4987,12 @@ These templates are based on the use of iso_c_binding
. Pointers hav
-
integer function trexio_write_$group_str$ (trex_file, str, max_str_len)
+integer(trexio_exit_code) function trexio_write_$group_str$ (trex_file, str, max_str_len)
use, intrinsic :: iso_c_binding, only : c_null_char
implicit none
- integer(8), intent(in), value :: trex_file
- integer(4), intent(in), value :: max_str_len
- character(len=*), intent(in) :: str
+ integer(trexio_t), intent(in), value :: trex_file
+ integer(c_int32_t), intent(in), value :: max_str_len
+ character(len=*), intent(in) :: str
character(len=len_trim(str)+1) :: str_c
@@ -4959,8 +5006,8 @@ These templates are based on the use of iso_c_binding
. Pointers hav
-
-
3.6.4 Python templates for front end
+
+
3.6.4 Python templates for front end
def write_$group_str$(trexio_file, str_w: str) -> None:
@@ -5050,8 +5097,8 @@ These templates are based on the use of iso_c_binding
. Pointers hav
-
-
4 Fortran helper/wrapper functions
+
+
4 Fortran helper/wrapper functions
The function below adapts the original C-based trexio_open
for Fortran.
@@ -5062,18 +5109,18 @@ Note, that Fortran interface calls the main TREXIO
API, which is wr
contains
- integer(8) function trexio_open (filename, mode, backend, rc_open)
+ integer(trexio_t) function trexio_open (filename, mode, back_end, rc_open)
use, intrinsic :: iso_c_binding, only : c_null_char
implicit none
- character(len=*), intent(in) :: filename
- character, intent(in), value :: mode
- integer(trexio_backend), intent(in), value :: backend
- integer(trexio_exit_code), intent(out) :: rc_open
- character(len=len_trim(filename)+1) :: filename_c
+ character(len=*), intent(in) :: filename
+ character, intent(in), value :: mode
+ integer(trexio_back_end_t), intent(in), value :: back_end
+ integer(trexio_exit_code), intent(out) :: rc_open
+ character(len=len_trim(filename)+1) :: filename_c
integer(trexio_exit_code) :: rc
filename_c = trim(filename) // c_null_char
- trexio_open = trexio_open_c(filename_c, mode, backend, rc_open)
+ trexio_open = trexio_open_c(filename_c, mode, back_end, rc_open)
if (trexio_open == 0_8 .or. rc_open /= TREXIO_SUCCESS) then
return
endif
@@ -5093,7 +5140,7 @@ Note, that Fortran interface calls the main TREXIO
API, which is wr
-
integer function trexio_inquire (filename)
+integer(trexio_exit_code) function trexio_inquire (filename)
use, intrinsic :: iso_c_binding
implicit none
character(len=*), intent(in) :: filename
@@ -5117,11 +5164,11 @@ C API. This is needed due to the fact that strings in C are terminated by
use, intrinsic :: iso_c_binding, only : c_null_char
implicit none
- integer(8), intent(in), value :: max_num_str ! number of elements in strign array
+ integer(c_int64_t), intent(in), value :: max_num_str ! number of elements in strign array
integer, intent(in), value :: max_len_str ! maximum length of a string in an array
character(len=*), intent(in) :: str_array(*)
character(len=:), allocatable, intent(out) :: str_res
- integer(8) :: i
+ integer(c_int64_t) :: i
str_res = ''
do i = 1, max_num_str
@@ -5141,13 +5188,13 @@ The subroutine below does the reverse tranformation from one big string with del
subroutine trexio_str2strarray(str_flat, max_num_str, max_len_str, str_array)
implicit none
- integer(8), intent(in), value :: max_num_str ! number of elements in strign array
- integer, intent(in), value :: max_len_str ! maximum length of a string in an array
- character, intent(in) :: str_flat(*)
- character(len=*), intent(inout) :: str_array(*)
+ integer(c_int64_t), intent(in), value :: max_num_str ! number of elements in strign array
+ integer, intent(in), value :: max_len_str ! maximum length of a string in an array
+ character(kind=c_char), intent(in) :: str_flat(*)
+ character(len=*), intent(inout) :: str_array(*)
character(len=max_len_str) :: tmp_str
- integer(8) :: len_flat, i, j, k, ind
+ integer(c_int64_t) :: i, j, k, ind, len_flat
len_flat = (max_len_str+1)*max_num_str + 1
@@ -5203,7 +5250,7 @@ two code are identical, i.e. if the assert
statement pass.
Author: TREX-CoE
-
Created: 2022-01-19 Wed 18:34
+
Created: 2022-01-21 Fri 11:33
Validate
diff --git a/templator_hdf5.html b/templator_hdf5.html
index 1a3c97f..06aca5e 100644
--- a/templator_hdf5.html
+++ b/templator_hdf5.html
@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
+
HDF5 back end
@@ -311,29 +311,29 @@ for the JavaScript code in this tag.
Table of Contents
-
-
1 HDF5 back end
+
+
1 HDF5 back end
-
-
1.1 Template for HDF5 definitions
+
+
1.1 Template for HDF5 definitions
#define $GROUP$_GROUP_NAME "$group$"
@@ -345,8 +345,8 @@ for the JavaScript code in this tag.
-
-
1.2 Template for HDF5 structures
+
+
1.2 Template for HDF5 structures
typedef struct trexio_hdf5_s {
@@ -359,8 +359,8 @@ for the JavaScript code in this tag.
-
-
1.3 Template for HDF5 init/deinit
+
+
1.3 Template for HDF5 init/deinit
trexio_exit_code
@@ -460,8 +460,8 @@ for the JavaScript code in this tag.
-
-
1.4 Template for HDF5 has/read/write the numerical attribute
+
+
1.4 Template for HDF5 has/read/write the numerical attribute
trexio_exit_code
@@ -555,8 +555,8 @@ for the JavaScript code in this tag.
-
-
1.5 Template for HDF5 has/read/write the dataset of numerical data
+
+
1.5 Template for HDF5 has/read/write the dataset of numerical data
trexio_exit_code
@@ -678,8 +678,8 @@ for the JavaScript code in this tag.
-
-
1.6 Template for HDF5 has/read/write the dataset of sparse data
+
+
1.6 Template for HDF5 has/read/write the dataset of sparse data
Sparse data is stored using extensible datasets of HDF5. Extensibility is required
@@ -880,8 +880,8 @@ due to the fact that the sparse data will be written in chunks of user-defined s
-
-
1.7 Template for HDF5 has/read/write the dataset of strings
+
+
1.7 Template for HDF5 has/read/write the dataset of strings
trexio_exit_code
@@ -1085,8 +1085,8 @@ due to the fact that the sparse data will be written in chunks of user-defined s
-
-
1.8 Template for HDF5 has/read/write the string attribute
+
+
1.8 Template for HDF5 has/read/write the string attribute
trexio_exit_code
@@ -1208,8 +1208,8 @@ due to the fact that the sparse data will be written in chunks of user-defined s
-
-
1.9 Helper functions
+
+
1.9 Helper functions
trexio_exit_code
@@ -1471,7 +1471,7 @@ due to the fact that the sparse data will be written in chunks of user-defined s
Author: TREX-CoE
-
Created: 2022-01-19 Wed 18:34
+
Created: 2022-01-21 Fri 11:33
Validate
diff --git a/templator_text.html b/templator_text.html
index cbd3e84..51234c9 100644
--- a/templator_text.html
+++ b/templator_text.html
@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
+
TEXT back end
@@ -311,28 +311,28 @@ for the JavaScript code in this tag.
Table of Contents
-
-
1 TEXT back end
+
+
1 TEXT back end
The "file" produced by the text back end is a directory with one
@@ -353,8 +353,8 @@ The file is written when closed, or when the flush function is called.
-
-
1.1 Template for group-related structures in text back end
+
+
1.1 Template for group-related structures in text back end
typedef struct $group$_s {
@@ -373,8 +373,8 @@ The file is written when closed, or when the flush function is called.
-
-
1.2 Template for general structure in text back end
+
+
1.2 Template for general structure in text back end
typedef struct trexio_text_s {
@@ -387,8 +387,8 @@ The file is written when closed, or when the flush function is called.
-
-
1.3 Initialize function (constant part)
+
+
1.3 Initialize function (constant part)
trexio_exit_code
@@ -531,8 +531,8 @@ The file is written when closed, or when the flush function is called.
-
-
1.4 Deinitialize function (templated part)
+
+
1.4 Deinitialize function (templated part)
trexio_exit_code
@@ -554,8 +554,8 @@ The file is written when closed, or when the flush function is called.
-
-
1.5 Template for text read struct
+
+
1.5 Template for text read struct
$group$_t*
@@ -847,8 +847,8 @@ trexio_text_read_$group$ (trexio_text_t*
-
-
1.6 Template for text flush struct
+
+
1.6 Template for text flush struct
trexio_exit_code
@@ -913,8 +913,8 @@ trexio_text_read_$group$ (trexio_text_t*
-
-
1.7 Template for text free memory
+
+
1.7 Template for text free memory
Memory is allocated when reading. The following function frees memory.
@@ -959,8 +959,8 @@ Memory is allocated when reading. The following function frees memory.
-
-
1.8 Template for has/read/write the numerical attribute
+
+
1.8 Template for has/read/write the numerical attribute
trexio_exit_code
@@ -1023,8 +1023,8 @@ Memory is allocated when reading. The following function frees memory.
-
-
1.9 Template for has/read/write the dataset of numerical data
+
+
1.9 Template for has/read/write the dataset of numerical data
The group_dset
array is assumed allocated with the appropriate size.
@@ -1120,8 +1120,8 @@ The group_dset
array is assumed allocated with the appropriate size
-
-
1.10 Template for has/read/write the dataset of strings
+
+
1.10 Template for has/read/write the dataset of strings
The group_dset
array is assumed allocated with the appropriate size.
@@ -1222,8 +1222,8 @@ The group_dset
array is assumed allocated with the appropriate size
-
-
1.11 Template for has/read/write the string attribute
+
+
1.11 Template for has/read/write the string attribute
trexio_exit_code
@@ -1297,8 +1297,8 @@ The group_dset
array is assumed allocated with the appropriate size
-
-
1.12 Template for has/read/write the dataset of sparse data
+
+
1.12 Template for has/read/write the dataset of sparse data
Each sparse array is stored in a separate .txt
file due to the fact that sparse I/O has to be decoupled
@@ -1575,7 +1575,7 @@ User provides indices and values of the sparse array as two separate variables.
Author: TREX-CoE
-
Created: 2022-01-19 Wed 18:34
+
Created: 2022-01-21 Fri 11:33
Validate
diff --git a/trex.html b/trex.html
index 522e393..ad8d308 100644
--- a/trex.html
+++ b/trex.html
@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
+
TREX Configuration file
@@ -333,33 +333,33 @@ for the JavaScript code in this tag.
Table of Contents
@@ -409,8 +409,8 @@ fetched using multiple function calls to perform I/O on buffers.
-
-
1 Metadata (metadata group)
+
+
1 Metadata (metadata group)
As we expect our files to be archived in open-data repositories, we
@@ -420,7 +420,7 @@ which have participated to the creation of the file, a list of
authors of the file, and a textual description.
-
+
@@ -487,15 +487,15 @@ authors of the file, and a textual description.
-
-
2 Electron (electron group)
+
+
2 Electron (electron group)
We consider wave functions expressed in the spin-free formalism, where
the number of ↑ and ↓ electrons is fixed.
-
+
@@ -534,15 +534,15 @@ the number of ↑ and ↓ electrons is fixed.
-
-
3 Nucleus (nucleus group)
+
+
3 Nucleus (nucleus group)
The nuclei are considered as fixed point charges. Coordinates are
given in Cartesian \((x,y,z)\) format.
-
+
@@ -609,8 +609,8 @@ given in Cartesian \((x,y,z)\) format.
-
-
4 Effective core potentials (ecp group)
+
+
4 Effective core potentials (ecp group)
An effective core potential (ECP) \(V_A^{\text{ECP}}\) replacing the
@@ -643,7 +643,7 @@ The functions \(V_{A\ell}\) are parameterized as:
See http://dx.doi.org/10.1063/1.4984046 or https://doi.org/10.1063/1.5121006 for more info.
-
+
@@ -741,8 +741,8 @@ The latter causes issues when written before ang_mom
in the TREXIO
-
-