|
11 | 11 |
|
12 | 12 | namespace dpct::shmem { |
13 | 13 |
|
14 | | -/// Initialize Intel SHMEM runtime based on exisiting communicator in attributes |
| 14 | +/// Initialize Intel SHMEM library based on exisiting communicator |
15 | 15 | /// \param [in] runtime_flags specify the underlying communicator like MPI/ |
16 | 16 | /// OpenSHMEM to initialize iSHMEM for launcher agnostic bootstrapping |
17 | | -/// \param [in] attr attributes of existing communicator |
18 | | -void init_attr(unsigned runtime_flags, ishmemx_attr_t *attr) { |
| 17 | +/// \param [in] attr Additional attributes for initializing the iSHMEM library. |
| 18 | +void init_attr(ishmemx_runtime_type_t runtime_flags, ishmemx_attr_t *attr) { |
19 | 19 | if (runtime_flags == 0) { |
20 | 20 | // if no runtime flags are present, initialize iSHMEM normally |
21 | 21 | ishmem_init(); |
22 | 22 | } else { |
23 | | - attr->runtime = static_cast<ishmemx_runtime_type_t>(runtime_flags); |
| 23 | + attr->runtime = runtime_flags; |
24 | 24 | ishmemx_init_attr(attr); |
25 | 25 | } |
26 | 26 | } |
27 | 27 |
|
28 | 28 | /// Update signal address with signal using signal operation |
29 | | -/// \param [out] sig_addr Address of the signal to be updated |
30 | | -/// \param [in] signal Value of the signal to update |
31 | | -/// \param [in] sig_op Operator used in updating signal address |
32 | | -/// \param [in] PE Processing element |
33 | | -void signal_op(uint64_t *sig_addr, uint64_t signal, int sig_op, int PE) { |
| 29 | +/// \param [out] sig_addr Symmetric address of the signal data object to be |
| 30 | +/// updated on the remote PE. |
| 31 | +/// \param [in] signal Unsigned 64-bit value that is used for updating the |
| 32 | +/// remote sig_addr signal data object. |
| 33 | +/// \param [in] sig_op Operator used to update signal data object |
| 34 | +/// \param [in] pe Processing element |
| 35 | +void signal_op(uint64_t *sig_addr, uint64_t signal, int sig_op, int pe) { |
34 | 36 | if (sig_op == ISHMEM_SIGNAL_SET) { |
35 | | - ishmemx_signal_set(sig_addr, signal, PE); |
| 37 | + ishmemx_signal_set(sig_addr, signal, pe); |
36 | 38 | } else if (sig_op == ISHMEM_SIGNAL_ADD) { |
37 | | - ishmemx_signal_add(sig_addr, signal, PE); |
| 39 | + ishmemx_signal_add(sig_addr, signal, pe); |
38 | 40 | } else { |
39 | 41 | throw std::runtime_error("Unsupported signal operator!"); |
40 | 42 | } |
|
0 commit comments