|
4 | 4 | * reserved. |
5 | 5 | * Copyright (c) 2019 ARM Ltd. All rights reserved. |
6 | 6 | * Copyright (c) 2024 NVIDIA Corporation. All rights reserved. |
| 7 | + * Copyright (c) 2024 Research Organization for Information Science |
| 8 | + * and Technology (RIST). All rights reserved. |
7 | 9 | * |
8 | 10 | * $COPYRIGHT$ |
9 | 11 | * |
@@ -165,13 +167,16 @@ ompi_op_aarch64_3buff_functions_sve[OMPI_OP_BASE_FORTRAN_OP_MAX][OMPI_OP_BASE_TY |
165 | 167 | static struct ompi_op_base_module_1_0_0_t * |
166 | 168 | mca_op_aarch64_component_op_query(struct ompi_op_t *op, int *priority) |
167 | 169 | { |
168 | | - ompi_op_base_module_t *module = OBJ_NEW(ompi_op_base_module_t); |
169 | 170 | /* Sanity check -- although the framework should never invoke the |
170 | 171 | _component_op_query() on non-intrinsic MPI_Op's, we'll put a |
171 | 172 | check here just to be sure. */ |
172 | 173 | if (0 == (OMPI_OP_FLAGS_INTRINSIC & op->o_flags)) { |
173 | 174 | return NULL; |
174 | 175 | } |
| 176 | + ompi_op_base_module_t *module = OBJ_NEW(ompi_op_base_module_t); |
| 177 | + if (NULL == module) { |
| 178 | + return NULL; |
| 179 | + } |
175 | 180 |
|
176 | 181 | switch (op->o_f_to_c_index) { |
177 | 182 | case OMPI_OP_BASE_FORTRAN_MAX: |
@@ -200,30 +205,30 @@ static struct ompi_op_base_module_1_0_0_t * |
200 | 205 | } |
201 | 206 | } |
202 | 207 | #endif /* defined(OMPI_MCA_OP_HAVE_NEON) */ |
203 | | - if( NULL != module->opm_fns[i] ) { |
204 | | - OBJ_RETAIN(module); |
205 | | - } |
206 | | - if( NULL != module->opm_3buff_fns[i] ) { |
207 | | - OBJ_RETAIN(module); |
208 | | - } |
209 | 208 | } |
210 | 209 | break; |
211 | 210 | case OMPI_OP_BASE_FORTRAN_LAND: |
| 211 | + OBJ_RELEASE(module); |
212 | 212 | module = NULL; |
213 | 213 | break; |
214 | 214 | case OMPI_OP_BASE_FORTRAN_LOR: |
| 215 | + OBJ_RELEASE(module); |
215 | 216 | module = NULL; |
216 | 217 | break; |
217 | 218 | case OMPI_OP_BASE_FORTRAN_LXOR: |
| 219 | + OBJ_RELEASE(module); |
218 | 220 | module = NULL; |
219 | 221 | break; |
220 | 222 | case OMPI_OP_BASE_FORTRAN_MAXLOC: |
| 223 | + OBJ_RELEASE(module); |
221 | 224 | module = NULL; |
222 | 225 | break; |
223 | 226 | case OMPI_OP_BASE_FORTRAN_MINLOC: |
| 227 | + OBJ_RELEASE(module); |
224 | 228 | module= NULL; |
225 | 229 | break; |
226 | 230 | default: |
| 231 | + OBJ_RELEASE(module); |
227 | 232 | module= NULL; |
228 | 233 | } |
229 | 234 | /* If we got a module from above, we'll return it. Otherwise, |
|
0 commit comments