1
1

UCX osc: re-use value returned by cswap to save additional get

Signed-off-by: Joseph Schuchart <schuchart@hlrs.de>
Этот коммит содержится в:
Joseph Schuchart 2019-09-13 18:16:35 +02:00
родитель 8606a02b87
Коммит 1a3c6bbf35

Просмотреть файл

@ -417,7 +417,6 @@ static int atomic_op_cswap(
for (int i = 0; i < origin_count; ++i) {
uint64_t tmp_val;
do {
uint64_t target_val = 0;
// get the value from the origin
@ -433,6 +432,8 @@ static int atomic_op_cswap(
return ret;
}
do {
tmp_val = target_val;
// compute the result value
ompi_op_reduce(op, (void *)origin_addr, &tmp_val, 1, origin_dt);