| 524 | | * `civlc.cvh`: the basic library of CIVL, usually included in a CIVL-C program, defining types and functions that are frequently used; |
| 525 | | |
| 526 | | * `scope.cvh`: providing utility functions related to dynamic scopes; |
| 527 | | |
| 528 | | * `pointer.cvh`: providing utility functions dealing with pointers; |
| 529 | | |
| 530 | | * `seq.cvh`: providing operations on sequences which is realized using arrays; |
| 531 | | |
| 532 | | * `concurrency.cvh`: providing concurrency utilities such as barrier and collective record; |
| 533 | | |
| 534 | | * `bundle.cvh`: defining bundle types and their operations; |
| 535 | | |
| 536 | | * `comm.cvh`: defining communicators and their operations. |
| | 525 | * `civlc`: the basic library of CIVL, usually included in a CIVL-C program, defining types and functions that are frequently used; |
| | 526 | |
| | 527 | * `scope`: providing utility functions related to dynamic scopes; |
| | 528 | |
| | 529 | * `pointer`: providing utility functions dealing with pointers; |
| | 530 | |
| | 531 | * `seq`: providing operations on sequences which is realized using arrays; |
| | 532 | |
| | 533 | * `concurrency`: providing concurrency utilities such as barrier and collective record; |
| | 534 | |
| | 535 | * `bundle`: defining bundle types and their operations; |
| | 536 | |
| | 537 | * `comm`: defining communicators and their operations. |
| 546 | | * is a scope reference defined? |
| 547 | | |
| 548 | | `_Bool $scope_defined($scope s);` |
| 549 | | |
| 550 | | It returns true if the dynamic scope specified by `s` is defined, else it returns false. |
| 551 | | |
| 552 | | * is a process reference defined? |
| 553 | | |
| 554 | | `_Bool $proc_defined($proc p);` |
| 555 | | |
| 556 | | It returns true if and only if the given object of `$proc` type is defined. |
| 557 | | |
| 558 | | === Scope utilities `scope.cvh` === |
| 559 | | The header `scope.cvh` declares one function: `$scope` parent, which has signature |
| 560 | | |
| 561 | | `$scope $scope_parent($scope s);` |
| 562 | | |
| 563 | | This function returns the parent dynamic scope of the dynamic scope referenced by `s`. If `s` is the root dynamic scope, it returns the undefined value of type `$scope`. |
| | 547 | === Scope utilities `scope` === |
| | 548 | * parent of a scope |
| | 549 | |
| | 550 | `fun[lib="scope"] $scope_parent(s: Scope): Scope` |
| | 551 | |
| | 552 | This function returns the parent dynamic scope of the dynamic scope referenced by `s`. If `s` is the root dynamic scope, it returns the `scope_null`. |
| | 572 | `fun[lib="pointer"] $copy(ptr: Pointer, value: pointer)` |
| | 573 | |
| | 574 | copies the value pointed to by `value` to the memory location specified by `ptr`. |
| | 575 | |
| | 576 | * get leaf node pointers: |
| | 577 | |
| | 578 | `fun[lib="pointer"] $leaf_node_ptrs(array: Pointer, obj: Pointer)` |
| | 579 | |
| | 580 | copies the references to the leaf nodes of `obj` to the given `array`. The type of `obj` is `Pointer[T']`, all leaf nodes of `T'` has type `T`, and `array` has type `Pointer[Array[T]]`. For example, `T'` could be `Tuple[<Integer, Array[Integer], Integer>]` |
| | 581 | |
| | 582 | * set leaf nodes: |
| | 583 | `fun[lib="pointer"] ` |
| | 584 | |
| | 585 | |