| 279 | """ |
| 280 | from .algorithms import global_func |
| 281 | class AllImpl: |
| 282 | def op(self): |
| 283 | return algs.all |
| 284 | |
| 285 | def mpi_op(self): |
| 286 | from mpi4py import MPI |
| 287 | return MPI.LAND |
| 288 | |
| 289 | def serial_composite(self, array, axis): |
| 290 | res = _apply_func2(algs.all, array, (axis,)) |
| 291 | clean_list = [] |
| 292 | for a in res: |
| 293 | if a is not dsa.NoneArray: |
| 294 | clean_list.append(a) |
| 295 | if clean_list is []: |
| 296 | return None |
| 297 | return algs.all(clean_list, axis=0) |
| 298 | |
| 299 | def default(self, max_comps): |
| 300 | return numpy.ones(max_comps, dtype=bool) |
| 301 | |
| 302 | return global_func(AllImpl(), array, axis, controller) |
| 303 | |