UCX osc: simplify output address computation
Signed-off-by: Joseph Schuchart <schuchart@hlrs.de>
Этот коммит содержится в:
родитель
d888b4fd76
Коммит
899f58cef5
@ -370,6 +370,10 @@ static int do_atomic_op_replace_sum(
|
|||||||
|
|
||||||
opal_common_ucx_user_req_handler_t user_req_cb = NULL;
|
opal_common_ucx_user_req_handler_t user_req_cb = NULL;
|
||||||
void *user_req_ptr = NULL;
|
void *user_req_ptr = NULL;
|
||||||
|
void *output_addr = &(module->req_result);
|
||||||
|
if( result_addr ) {
|
||||||
|
output_addr = result_addr;
|
||||||
|
}
|
||||||
for (int i = 0; i < origin_count; ++i) {
|
for (int i = 0; i < origin_count; ++i) {
|
||||||
uint64_t value = 0;
|
uint64_t value = 0;
|
||||||
if ((origin_count - 1) == i && NULL != ucx_req) {
|
if ((origin_count - 1) == i && NULL != ucx_req) {
|
||||||
@ -391,14 +395,14 @@ static int do_atomic_op_replace_sum(
|
|||||||
memcpy(&value, origin_addr, origin_dt_bytes);
|
memcpy(&value, origin_addr, origin_dt_bytes);
|
||||||
}
|
}
|
||||||
ret = opal_common_ucx_wpmem_fetch_nb(module->mem, opcode, value, target,
|
ret = opal_common_ucx_wpmem_fetch_nb(module->mem, opcode, value, target,
|
||||||
result_addr ? result_addr : &(module->req_result),
|
output_addr, origin_dt_bytes, remote_addr,
|
||||||
origin_dt_bytes, remote_addr, user_req_cb, user_req_ptr);
|
user_req_cb, user_req_ptr);
|
||||||
|
|
||||||
// advance origin and remote address
|
// advance origin and remote address
|
||||||
origin_addr = (void*)((intptr_t)origin_addr + origin_dt_bytes);
|
origin_addr = (void*)((intptr_t)origin_addr + origin_dt_bytes);
|
||||||
remote_addr += origin_dt_bytes;
|
remote_addr += origin_dt_bytes;
|
||||||
if (result_addr) {
|
if (result_addr) {
|
||||||
result_addr = (void*)((intptr_t)result_addr + origin_dt_bytes);
|
output_addr = (void*)((intptr_t)output_addr + origin_dt_bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user