ESDM
Middleware for Earth System Data
esdm-internal.h
Go to the documentation of this file.
1 
7 #ifndef ESDM_INTERNAL_H
8 #define ESDM_INTERNAL_H
9 
10 #include <jansson.h>
11 #include <glib.h>
12 #include <inttypes.h>
13 
14 #include <esdm-datatypes-internal.h>
15 #include <esdm-stream.h>
16 #include <esdm-debug.h>
17 #include <esdm.h>
18 
19 // ESDM Core //////////////////////////////////////////////////////////////////
20 
21 #ifndef min
22 #define min(x, y) (x < y ? x : y)
23 #define max(x, y) (x > y ? x : y)
24 #endif
25 
27 // Configuration //////////////////////////////////////////////////////////////
29 
38 
39 esdm_config_t *esdm_config_init_from_str(const char *str);
40 
41 esdm_config_t* esdmI_getConfig();
42 
43 esdm_status esdm_config_finalize(esdm_instance_t *esdm);
44 
49 char *esdm_config_gather();
50 
57 
58 esdm_config_backend_t *esdm_config_get_metadata_coordinator(esdm_instance_t *esdm);
59 
60 esdm_instance_t* esdmI_esdm();
61 
63 // Modules /////////////////////////////////////////////////////////////////////
65 
66 esdm_modules_t* esdm_get_modules();
67 
68 esdm_modules_t *esdm_modules_init(esdm_instance_t *esdm);
69 
74 
75 /*
76  * Randomly assign a backend based on their performance
77  */
78 esdm_backend_t* esdm_modules_randomWeightedBackend(esdm_modules_t* modules);
79 
80 esdm_status esdm_modules_finalize();
81 
91 esdm_backend_t** esdm_modules_makeBackendRecommendation(esdm_modules_t* modules, esdm_dataspace_t* space, int64_t* out_moduleCount, int64_t* out_maxFragmentSize);
92 
93 esdm_status esdm_modules_register();
94 
95 esdm_status esdm_modules_get_by_type(esdm_module_type_t type, esdm_module_type_array_t **array);
96 
97 
99 // Scheduler //////////////////////////////////////////////////////////////////
101 
102 esdm_scheduler_t *esdm_scheduler_init(esdm_instance_t *esdm);
103 
104 esdm_status esdm_scheduler_finalize(esdm_instance_t *esdm);
105 
106 esdm_status esdm_scheduler_status_init(io_request_status_t *status);
107 
108 esdm_status esdm_scheduler_status_finalize(io_request_status_t *status);
109 
119 esdm_status esdm_scheduler_read_blocking(esdm_instance_t *esdm, esdm_dataset_t *dataset, void *buf, esdm_dataspace_t *memspace, esdmI_hypercubeSet_t** out_fillRegion, bool allowWriteback, bool requestIsInternal);
120 
121 esdm_status esdm_scheduler_write_blocking(esdm_instance_t *esdm, esdm_dataset_t *dataset, void *buf, esdm_dataspace_t *memspace, bool requestIsInternal);
122 
123 esdm_status esdmI_scheduler_writeFragmentBlocking(esdm_instance_t* esdm, esdm_fragment_t* fragment, bool requestIsInternal);
124 void esdmI_scheduler_writeFragmentNonblocking(esdm_instance_t* esdm, esdm_fragment_t* fragment, bool requestIsInternal, io_request_status_t* status);
125 
126 esdm_status esdmI_scheduler_readSingleFragmentBlocking(esdm_instance_t* esdm, esdm_dataset_t* dataset, void* buffer, esdm_dataspace_t* memspace, esdm_fragment_t* fragment);
127 
128 esdm_status esdm_scheduler_enqueue(esdm_instance_t *esdm, io_request_status_t *status, io_operation_t type, esdm_dataset_t *dataset, void *buf, esdm_dataspace_t *memspace);
129 
130 esdm_status esdm_scheduler_wait(io_request_status_t *status);
131 
143 esdm_status esdmI_readWithFillRegion(esdm_dataset_t *dataset, void *buf, esdm_dataspace_t *memspace, esdmI_hypercubeSet_t** out_fillRegion);
144 
146 // Performance ////////////////////////////////////////////////////////////////
148 
152 void fetch_performance_from_backend(gpointer key, gpointer value, gpointer user_data);
153 
154 esdm_performance_t *esdm_performance_init(esdm_instance_t *esdm);
155 
162 
163 esdm_status esdm_performance_finalize();
164 
165 esdm_readTimes_t esdmI_performance_read();
166 esdm_readTimes_t esdmI_performance_read_add(const esdm_readTimes_t* a, const esdm_readTimes_t* b);
167 esdm_readTimes_t esdmI_performance_read_sub(const esdm_readTimes_t* minuend, const esdm_readTimes_t* subtrahend);
168 void esdmI_performance_read_print(FILE* stream, const char* linePrefix, const char* indentation, const esdm_readTimes_t* start, const esdm_readTimes_t* end); //start may be NULL
169 
170 esdm_writeTimes_t esdmI_performance_write();
171 esdm_writeTimes_t esdmI_performance_write_add(const esdm_writeTimes_t* a, const esdm_writeTimes_t* b);
172 esdm_writeTimes_t esdmI_performance_write_sub(const esdm_writeTimes_t* minuend, const esdm_writeTimes_t* subtrahend);
173 void esdmI_performance_write_print(FILE* stream, const char* linePrefix, const char* indentation, const esdm_writeTimes_t* start, const esdm_writeTimes_t* end); //start may be NULL
174 
175 esdm_copyTimes_t esdmI_performance_copy();
176 esdm_copyTimes_t esdmI_performance_copy_add(const esdm_copyTimes_t* a, const esdm_copyTimes_t* b);
177 esdm_copyTimes_t esdmI_performance_copy_sub(const esdm_copyTimes_t* minuend, const esdm_copyTimes_t* subtrahend);
178 void esdmI_performance_copy_print(FILE* stream, const char* linePrefix, const char* indentation, const esdm_copyTimes_t* start, const esdm_copyTimes_t* end); //start may be NULL
179 
180 esdm_backendTimes_t esdmI_performance_backend();
181 esdm_backendTimes_t esdmI_performance_backend_add(const esdm_backendTimes_t* a, const esdm_backendTimes_t* b);
182 esdm_backendTimes_t esdmI_performance_backend_sub(const esdm_backendTimes_t* minuend, const esdm_backendTimes_t* subtrahend);
183 void esdmI_performance_backend_print(FILE* stream, const char* linePrefix, const char* indentation, const esdm_backendTimes_t* start, const esdm_backendTimes_t* end); //start may be NULL
184 
185 esdm_fragmentsTimes_t esdmI_performance_fragments();
186 esdm_fragmentsTimes_t esdmI_performance_fragments_add(const esdm_fragmentsTimes_t* a, const esdm_fragmentsTimes_t* b);
187 esdm_fragmentsTimes_t esdmI_performance_fragments_sub(const esdm_fragmentsTimes_t* minuend, const esdm_fragmentsTimes_t* subtrahend);
188 void esdmI_performance_fragments_print(FILE* stream, const char* linePrefix, const char* indentation, const esdm_fragmentsTimes_t* start, const esdm_fragmentsTimes_t* end); //start may be NULL
189 
190 //wrappers for the backend API functions that perform the time measurement to be retrieved via esdmI_performance_backend()
191 int esdmI_backend_finalize(esdm_backend_t * b);
192 int esdmI_backend_performance_estimate(esdm_backend_t * b, esdm_fragment_t *fragment, float *out_time);
193 float esdmI_backend_estimate_throughput (esdm_backend_t * b);
194 int esdmI_backend_fragment_create (esdm_backend_t * b, esdm_fragment_t *fragment);
195 int esdmI_backend_fragment_retrieve(esdm_backend_t * b, esdm_fragment_t *fragment);
196 int esdmI_backend_fragment_update (esdm_backend_t * b, esdm_fragment_t *fragment);
197 int esdmI_backend_fragment_delete (esdm_backend_t * b, esdm_fragment_t *fragment);
198 int esdmI_backend_fragment_metadata_create(esdm_backend_t * b, esdm_fragment_t *fragment, smd_string_stream_t* stream);
199 void* esdmI_backend_fragment_metadata_load(esdm_backend_t * b, esdm_fragment_t *fragment, json_t *metadata);
200 int esdmI_backend_fragment_metadata_free (esdm_backend_t * b, void * options);
201 int esdmI_backend_mkfs(esdm_backend_t * b, int format_flags);
202 int esdmI_backend_fsck(esdm_backend_t * b);
203 int esdmI_backend_fragment_write_stream_blocksize(esdm_backend_t * b, estream_write_t * state, void * cur_buf, size_t cur_offset, uint32_t cur_size);
204 
205 double esdmI_backendOutputTime();
206 double esdmI_backendInputTime();
207 void esdmI_resetBackendIoTimes();
208 
210 // Container //////////////////////////////////////////////////////////////////
212 
213 void esdmI_container_init(char const * name, esdm_container_t **out_container);
214 
215 esdm_status esdm_container_open_md_load(esdm_container_t *c, char ** out_md, int * out_size);
216 esdm_status esdm_container_open_md_parse(esdm_container_t *c, char * md, int size);
217 
218 void esdmI_container_register_dataset(esdm_container_t * c, esdm_dataset_t *dset);
219 
228 
229 
231 // Dataset ////////////////////////////////////////////////////////////////////
233 
234 void esdm_dataset_init(esdm_container_t *container, const char *name, esdm_dataspace_t *dataspace, esdm_dataset_t **out_dataset);
235 
236 esdm_status esdm_dataset_open_md_load(esdm_dataset_t *dset, char ** out_md, int * out_size);
237 esdm_status esdm_dataset_open_md_parse(esdm_dataset_t *d, char * md, int size);
238 
239 esdm_status esdmI_dataset_fragmentsCoveringRegion(esdm_dataset_t* dataset, esdmI_hypercube_t* region, int64_t* out_count, esdm_fragment_t*** out_fragments, esdmI_hypercubeSet_t** out_uncovered, bool* out_fullyCovered);
240 
241 // Creates a fragment or returns an existing one.
242 // The dataset will own the fragment.
243 // In the case that an existing fragment is returned, the `buf` parameter is ignored.
244 esdm_fragment_t* esdmI_dataset_createFragment(esdm_dataset_t* dataset, esdm_dataspace_t* memspace, void *buf, bool* out_newFragment);
245 
246 esdm_fragment_t* esdmI_dataset_lookupFragmentForShape(esdm_dataset_t* dataset, esdm_dataspace_t* shape);
247 
258 
259 
261 // Dataspace //////////////////////////////////////////////////////////////////
263 
273 
283 esdm_status esdmI_dataspace_createFromJson(json_t* json, esdm_dataset_t* dataset, esdm_dataspace_t** out_dataspace);
284 
294 
304 
305 
307 // Fragment ///////////////////////////////////////////////////////////////////
309 
310 void esdmI_fragments_construct(esdm_fragments_t* me);
311 esdm_status esdmI_fragments_add(esdm_fragments_t* me, esdm_fragment_t* fragment) __attribute__((warn_unused_result)); //takes possession of the fragment, eventually calling `esdm_fragment_destroy()` on it when the `esdm_fragments_t` object is destructed
312 esdm_fragment_t* esdmI_fragments_lookupForShape(esdm_fragments_t* me, esdmI_hypercube_t* shape);
313 esdm_status esdmI_fragments_deleteAll(esdm_fragments_t* me); //calls `esdmI_backend_fragment_delete()` and `esdmI_fragment_destroy()` on all fragments, leaving the fragment list empty on success
314 esdm_fragment_t** esdmI_fragments_makeSetCoveringRegion(esdm_fragments_t* me, esdmI_hypercube_t* region, int64_t* out_fragmentCount); //caller is responsible to free the returned array
315 void esdmI_fragments_metadata_create(esdm_fragments_t* me, smd_string_stream_t* s);
316 void esdmI_fragments_purge(esdm_fragments_t* me); //this will `esdm_fragment_destroy()` all currently stored fragments
317 esdm_status esdmI_fragments_destruct(esdm_fragments_t* me); //calls `esdm_fragment_destroy()` on its members, but does not invoke the `fragment_delete()` callback of the backend
318 
319 void esdm_fragment_metadata_create(esdm_fragment_t *f, smd_string_stream_t * stream);
320 esdm_status esdmI_create_fragment_from_metadata(esdm_dataset_t *dset, json_t * json, esdm_fragment_t ** out);
321 
337 esdm_status esdmI_fragment_create(esdm_dataset_t *dataset, esdm_dataspace_t *memspace, void *buf, esdm_fragment_t **out_fragment);
338 
340 // Dysfunctional stuff ////////////////////////////////////////////////////////
342 
343 // Layout
344 
353 
363 
373 
382 
383 
385 // Backend (generic) //////////////////////////////////////////////////////////
387 
388 esdm_backend_t * esdmI_init_backend(char const * name, esdm_config_backend_t * config);
389 
390 esdm_status esdm_backend_t_estimate_performance(esdm_backend_t *backend, int fragment);
391 
392 
394 // auxiliary.c ////////////////////////////////////////////////////////////////
396 
400 void print_stat(struct stat sb);
401 
402 int mkdir_recursive(const char *path);
403 int posix_recursive_remove(const char *path); //returns an error code
404 
405 int ea_read_file(char *filepath, char **buf);
406 
410 int ea_read_check(int fd, char *buf, size_t len);
411 
415 int ea_write_check(int fd, char *buf, size_t len);
416 
417 
418 json_t *load_json(const char *str);
419 
420 esdm_backend_t * esdmI_get_backend(char const * plugin_id);
421 
422 void ea_generate_id(char *str, size_t length); //str is a preexisting buffer with `length + 1` bytes
423 char* ea_make_id(size_t length); //`malloc()`s a buffer for the result and calls through to `ea_generate_id()`
424 
428 void* ea_checked_malloc(size_t size) __attribute__((alloc_size(1), malloc));
429 
433 void* ea_checked_calloc(size_t nmemb, size_t size) __attribute__((alloc_size(1, 2), malloc));
434 
438 void* ea_checked_realloc(void* ptr, size_t size) __attribute__((alloc_size(2), malloc));
439 
443 char* ea_checked_strdup(const char* string);
444 
448 char* ea_checked_strndup(const char* string, size_t n);
449 
458 void* ea_memdup(void* data, size_t size);
459 
460 int ea_compute_hash_str(const char * str);
461 bool ea_is_valid_dataset_name(const char *str);
462 
463 // timer functions
464 #ifdef ESM
465 typedef clock64_t timer;
466 #else
467 typedef struct timespec timer;
468 #endif
469 
470 void ea_start_timer(timer *t1);
471 double ea_stop_timer(timer t1);
472 double ea_timer_subtract(timer number, timer subtract);
473 
474 //data conversion
475 typedef void* (*ea_datatype_converter)(void* dest, const void* source, size_t sourceBytes);
476 
488 ea_datatype_converter ea_converter_for_types(esdm_type_t destType, esdm_type_t sourceType);
489 
491 // esdmI_range_t //////////////////////////////////////////////////////////////
493 
494 //the resulting range may be empty
495 inline esdmI_range_t esdmI_range_intersection(esdmI_range_t a, esdmI_range_t b) {
496  return (esdmI_range_t){
497  .start = a.start > b.start ? a.start : b.start,
498  .end = a.end < b.end ? a.end : b.end
499  };
500 }
501 
502 static inline bool esdmI_range_isEmpty(esdmI_range_t range) { return range.start >= range.end; }
503 
504 static inline bool esdmI_range_equal(esdmI_range_t a, esdmI_range_t b) { return a.start == b.start && a.end == b.end; }
505 
506 static inline int64_t esdmI_range_size(esdmI_range_t range) { return esdmI_range_isEmpty(range) ? 0 : range.end - range.start; }
507 
508 void esdmI_range_print(esdmI_range_t range, FILE* stream);
509 
510 
512 // esdmI_hypercube_t //////////////////////////////////////////////////////////
514 
515 esdmI_hypercube_t* esdmI_hypercube_makeDefault(int64_t dimensions); //initializes an empty hypercube with the given dimension count at (0, 0, ...)
516 
517 esdmI_hypercube_t* esdmI_hypercube_make(int64_t dimensions, int64_t* offset, int64_t* size);
518 
519 esdmI_hypercube_t* esdmI_hypercube_makeCopy(esdmI_hypercube_t* original);
520 
521 //returns NULL if the intersection is empty
522 esdmI_hypercube_t* esdmI_hypercube_makeIntersection(esdmI_hypercube_t* a, esdmI_hypercube_t* b);
523 
524 bool esdmI_hypercube_isEmpty(esdmI_hypercube_t* cube);
525 
526 //These two functions implement exactly the same algorithm,
527 //i.e. it is guaranteed that both return the same value when given the same shape.
528 //
529 //This is *not* a cryptographic hash.
530 uint32_t esdmI_hypercube_hash(const esdmI_hypercube_t* me);
531 uint32_t esdmI_hypercube_hashOffsetSize(int64_t dimCount, const int64_t* offset, const int64_t* size);
532 
533 bool esdmI_hypercube_doesIntersect(esdmI_hypercube_t* a, esdmI_hypercube_t* b);
534 
535 //Touch means no overlap is allowed.
536 //The two hypercubes must share a single border such that there is at least one pair of voxels next to each other
537 //where one voxel belongs to hypercube `a` while the other belongs to hypercube `b`.
538 bool esdmI_hypercube_touches(esdmI_hypercube_t* a, esdmI_hypercube_t* b);
539 
540 //Returns the count of grid points that are shared between the two hypercubes.
541 //This method is cheaper to call than the equivalent *_makeIntersection(), *_size(), *_destroy() combo;
542 //it avoids the overhead of actually creating the intersection hypercube.
543 int64_t esdmI_hypercube_overlap(esdmI_hypercube_t* a, esdmI_hypercube_t* b);
544 
545 bool esdmI_hypercube_equal(const esdmI_hypercube_t* a, const esdmI_hypercube_t* b);
546 
547 //Returns a value between 0.0 and 1.0 that is a measure of how similar the shapes of the hypercubes are.
548 //The positions of the two cubes are irrelevant, only size and shape matter.
549 //The algorithm basically translates both hypercubes to start at (0, ..., 0) and then checks the volume of the intersection against the volume of the two hypercubes.
550 //A return value of 1.0 means that the two hypercubes are identical modulo translation, a value of 0.0 is only achieved if one of the hypercubes is empty.
551 double esdmI_hypercube_shapeSimilarity(esdmI_hypercube_t* a, esdmI_hypercube_t* b);
552 
553 static inline int64_t esdmI_hypercube_dimensions(const esdmI_hypercube_t* cube) { return cube->dims; }
554 
562 void esdmI_hypercube_getOffsetAndSize(const esdmI_hypercube_t* cube, int64_t* out_offset, int64_t* out_size);
563 
564 int64_t esdmI_hypercube_size(esdmI_hypercube_t* cube);
565 
566 void esdmI_hypercube_print(esdmI_hypercube_t* cube, FILE* stream);
567 
568 void esdmI_hypercube_destroy(esdmI_hypercube_t* cube);
569 
570 
572 // esdmI_hypercubeList_t //////////////////////////////////////////////////////
574 
575 bool esdmI_hypercubeList_doesIntersect(esdmI_hypercubeList_t* list, esdmI_hypercube_t* cube);
576 
577 bool esdmI_hypercubeList_doesCoverFully(esdmI_hypercubeList_t* list, esdmI_hypercube_t* cube);
578 
597 void esdmI_hypercubeList_nonredundantSubsets_internal(esdmI_hypercubeList_t* list, int64_t count, int64_t* inout_setCount, uint8_t (*out_subsets)[count]);
598 //wrapper to encapsulate redundant passing of `list->count`
599 #define esdmI_hypercubeList_nonredundantSubsets(list, inout_setCount, out_subsets) do {\
600  esdmI_hypercubeList_t* l = list;\
601  esdmI_hypercubeList_nonredundantSubsets_internal(l, l->count, inout_setCount, out_subsets);\
602 } while(false)
603 
604 void esdmI_hypercubeList_print(esdmI_hypercubeList_t* list, FILE* stream); //for debugging purposes
605 
607 // esdmI_hypercubeSet_t ///////////////////////////////////////////////////////
609 
610 esdmI_hypercubeSet_t* esdmI_hypercubeSet_make(); //convenience function to construct a heap allocated object
611 void esdmI_hypercubeSet_construct(esdmI_hypercubeSet_t* me); //no allocation, initialization only
612 
613 //the returned list and the pointers it contains only remain valid as long the hypercubeSet is not changed in any way
614 esdmI_hypercubeList_t* esdmI_hypercubeSet_list(esdmI_hypercubeSet_t* me);
615 
616 bool esdmI_hypercubeSet_isEmpty(esdmI_hypercubeSet_t* me); //checks for logical emptiness, may remove empty hypercubes from the set
617 
618 int64_t esdmI_hypercubeSet_count(esdmI_hypercubeSet_t* me);
619 
620 void esdmI_hypercubeSet_add(esdmI_hypercubeSet_t* me, esdmI_hypercube_t* cube);
621 
622 void esdmI_hypercubeSet_subtract(esdmI_hypercubeSet_t* me, esdmI_hypercube_t* cube);
623 
624 void esdmI_hypercubeSet_destruct(esdmI_hypercubeSet_t* me); //counterpart to esdmI_hypercubeSet_construct()
625 void esdmI_hypercubeSet_destroy(esdmI_hypercubeSet_t* me); //counterpart to esdmI_hypercubeSet_make()
626 
628 // esdmI_hypercubeNeighbourManager_t //////////////////////////////////////////
630 
631 esdmI_hypercubeNeighbourManager_t* esdmI_hypercubeNeighbourManager_make(int64_t dimensions); //all hypercubes added to this manager need to have the same rank
632 
633 //the returned list and the pointers it contains only remain valid as long the hypercubeNeighbourManager is not changed in any way
634 esdmI_hypercubeList_t* esdmI_hypercubeNeighbourManager_list(esdmI_hypercubeNeighbourManager_t* me);
635 
636 //takes possession of the cube, the caller needs to make a copy if necessary
637 void esdmI_hypercubeNeighbourManager_pushBack(esdmI_hypercubeNeighbourManager_t* me, esdmI_hypercube_t* cube);
638 
639 //Returns a pointer to an array that lists the neighbour indices of the given cube, this array has `*out_neighbourCount` entries.
640 //Callers must provide a non-NULL value for `out_neighbourCount`.
641 int64_t* esdmI_hypercubeNeighbourManager_getNeighbours(esdmI_hypercubeNeighbourManager_t* me, int64_t index, int64_t* out_neighbourCount);
642 
643 void esdmI_hypercubeNeighbourManager_destroy(esdmI_hypercubeNeighbourManager_t* me);
644 
645 #ifdef HAVE_SCIL
646 SCIL_Datatype_t ea_esdm_datatype_to_scil(smd_basic_type_t type);
647 #endif
648 
649 #endif
esdm_status
Definition: esdm-datatypes.h:37
void * ea_checked_calloc(size_t nmemb, size_t size) __attribute__((alloc_size(1
esdm_status esdmI_readWithFillRegion(esdm_dataset_t *dataset, void *buf, esdm_dataspace_t *memspace, esdmI_hypercubeSet_t **out_fillRegion)
Definition: esdm.c:190
esdm_backend_t ** esdm_modules_makeBackendRecommendation(esdm_modules_t *modules, esdm_dataspace_t *space, int64_t *out_moduleCount, int64_t *out_maxFragmentSize)
Definition: esdm-modules.c:123
esdm_layout_t * esdm_layout_init(esdm_instance_t *esdm)
Definition: esdm-layout.c:59
esdm_config_t * esdm_config_init()
ea_datatype_converter ea_converter_for_types(esdm_type_t destType, esdm_type_t sourceType)
esdm_status esdmI_dataspace_createFromJson(json_t *json, esdm_dataset_t *dataset, esdm_dataspace_t **out_dataspace)
Definition: esdm-datatypes.c:1481
void * ea_checked_malloc(size_t size) __attribute__((alloc_size(1)
void fetch_performance_from_backend(gpointer key, gpointer value, gpointer user_data)
Definition: esdm-performancemodel.c:59
esdm_status esdmI_dataspace_createFromHypercube(esdmI_hypercube_t *extends, esdm_type_t type, esdm_dataspace_t **out_space)
Definition: esdm-datatypes.c:1315
esdm_backend_t * esdm_modules_fastestBackend(esdm_modules_t *modules)
Definition: esdm-modules.c:155
esdm_status esdmI_fragment_create(esdm_dataset_t *dataset, esdm_dataspace_t *memspace, void *buf, esdm_fragment_t **out_fragment)
Definition: esdm-datatypes.c:410
char * ea_checked_strdup(const char *string)
Definition: auxiliary.c:341
esdm_status esdmI_dataset_destroy(esdm_dataset_t *dataset)
Definition: esdm-datatypes.c:1206
esdm_status esdmI_dataspace_setExtends(esdm_dataspace_t *space, esdmI_hypercube_t *extends)
Definition: esdm-datatypes.c:1365
esdm_fragment_t * esdm_layout_reconstruction(esdm_dataset_t *dataset, esdm_dataspace_t *subspace)
Definition: esdm-layout.c:80
esdm_status esdm_layout_finalize(esdm_instance_t *esdm)
Definition: esdm-layout.c:69
esdm_status esdmI_container_destroy(esdm_container_t *container)
Definition: esdm-datatypes.c:340
esdm_config_backends_t * esdm_config_get_backends(esdm_instance_t *esdm)
Definition: esdm-config.c:170
void * ea_memdup(void *data, size_t size)
Definition: auxiliary.c:359
char * ea_checked_strndup(const char *string, size_t n)
Definition: auxiliary.c:350
int ea_read_check(int fd, char *buf, size_t len)
Definition: auxiliary.c:193
esdm_status esdm_scheduler_read_blocking(esdm_instance_t *esdm, esdm_dataset_t *dataset, void *buf, esdm_dataspace_t *memspace, esdmI_hypercubeSet_t **out_fillRegion, bool allowWriteback, bool requestIsInternal)
Definition: esdm-scheduler.c:936
void esdmI_hypercubeList_nonredundantSubsets_internal(esdmI_hypercubeList_t *list, int64_t count, int64_t *inout_setCount, uint8_t(*out_subsets)[count])
Definition: hypercube.c:468
int ea_write_check(int fd, char *buf, size_t len)
Definition: auxiliary.c:175
esdm_status esdm_layout_recommendation(esdm_instance_t *esdm, esdm_fragment_t *in, esdm_fragment_t *out)
Definition: esdm-layout.c:99
void * ea_checked_realloc(void *ptr, size_t size) __attribute__((alloc_size(2)
char * esdm_config_gather()
Definition: esdm-config.c:101
esdm_status esdmI_dataspace_getExtends(esdm_dataspace_t *space, esdmI_hypercube_t **out_extends)
Definition: esdm-datatypes.c:1356
esdm_status esdm_performance_recommendation(esdm_instance_t *esdm, esdm_fragment_t *in, esdm_fragment_t *out)
Definition: esdm-performancemodel.c:66
void esdmI_hypercube_getOffsetAndSize(const esdmI_hypercube_t *cube, int64_t *out_offset, int64_t *out_size)
Definition: hypercube.c:216
void print_stat(struct stat sb)
Definition: auxiliary.c:215
Definition: esdm-datatypes-internal.h:360
Definition: esdm-datatypes-internal.h:445
Definition: esdm-datatypes-internal.h:367
Definition: esdm-datatypes-internal.h:354
Definition: esdm-datatypes-internal.h:349
Definition: esdm-datatypes-internal.h:483
Definition: esdm-datatypes-internal.h:197
Definition: esdm-datatypes-internal.h:252
Definition: esdm-datatypes-internal.h:269
Definition: esdm-datatypes-internal.h:297
Definition: esdm-datatypes-internal.h:41
Definition: esdm-datatypes-internal.h:475
Definition: esdm-datatypes-internal.h:59
Definition: esdm-datatypes.h:81
Definition: esdm-datatypes-internal.h:78
Definition: esdm-datatypes-internal.h:501
Definition: esdm-datatypes-internal.h:53
Definition: esdm-datatypes-internal.h:326
Definition: esdm-datatypes-internal.h:309
Definition: esdm-datatypes-internal.h:278
Definition: esdm-datatypes-internal.h:302
Definition: esdm-datatypes-internal.h:320
Definition: esdm-datatypes-internal.h:456
Definition: esdm-datatypes-internal.h:313
Definition: esdm-datatypes-internal.h:466
Definition: esdm-stream.h:158
Definition: esdm-datatypes-internal.h:222