2121
2222// Write an array to a dataset / file
2323// Returns 0 on success, nonzero on error.
24- int bsp_write_array (hid_t f , const char * label , bsp_array_t array ,
25- int compression_level ) {
24+ static inline int bsp_write_array (hid_t f , const char * label , bsp_array_t array ,
25+ int compression_level ) {
2626 if (array .type == BSP_COMPLEX_FLOAT32 || array .type == BSP_COMPLEX_FLOAT64 ) {
2727 array = bsp_complex_array_to_fp (array );
2828 }
@@ -76,8 +76,8 @@ int bsp_write_array(hid_t f, const char* label, bsp_array_t array,
7676}
7777
7878#if __STDC_VERSION__ >= 201112L
79- bsp_array_t bsp_read_array_parallel (hid_t f , const char * label ,
80- int num_threads ) {
79+ static inline bsp_array_t bsp_read_array_parallel (hid_t f , const char * label ,
80+ int num_threads ) {
8181 hid_t dset = H5Dopen2 (f , label , H5P_DEFAULT );
8282
8383 if (dset == H5I_INVALID_HID ) {
@@ -173,7 +173,7 @@ bsp_array_t bsp_read_array_parallel(hid_t f, const char* label,
173173}
174174#endif
175175
176- bsp_array_t bsp_read_array (hid_t f , const char * label ) {
176+ static inline bsp_array_t bsp_read_array (hid_t f , const char * label ) {
177177 hid_t dset = H5Dopen2 (f , label , H5P_DEFAULT );
178178
179179 if (dset == H5I_INVALID_HID ) {
@@ -212,7 +212,8 @@ bsp_array_t bsp_read_array(hid_t f, const char* label) {
212212 return array ;
213213}
214214
215- void bsp_write_attribute (hid_t f , const char * label , const char * string ) {
215+ static inline void bsp_write_attribute (hid_t f , const char * label ,
216+ const char * string ) {
216217 hid_t strtype = H5Tcopy (H5T_C_S1 );
217218 H5Tset_size (strtype , strlen (string ));
218219 H5Tset_cset (strtype , H5T_CSET_UTF8 );
@@ -228,7 +229,7 @@ void bsp_write_attribute(hid_t f, const char* label, const char* string) {
228229 H5Sclose (dataspace );
229230}
230231
231- char * bsp_read_attribute (hid_t f , const char * label ) {
232+ static inline char * bsp_read_attribute (hid_t f , const char * label ) {
232233 hid_t attribute = H5Aopen (f , label , H5P_DEFAULT );
233234 hid_t strtype = H5Aget_type (attribute );
234235
0 commit comments