mpi_array.benchmarks.bench_ufunc.MpiArrayUfuncBench_add¶
-
class
mpi_array.benchmarks.bench_ufunc.
MpiArrayUfuncBench_add
¶ Bases:
mpi_array.benchmarks.bench_ufunc.MpiArrayUfuncBench
Benchmark for
numpy.add
withmpi_array.globale.gndarray
array inputs.Methods
__init__
()free
(a)See free_mpi_array_obj()
.free_mpi_array_obj
(a)Free MPI communicators and MPI windows for the given object. get_globale_shape
(locale_shape)Returns a globale array shape for the given shape of the locale array. initialise
(shape, dtype, module_name)Sets the module
,dtype
andufunc
attributes and initialises thea_ary
,b_ary
,b_scalar
andc_ary
arrays.initialise_arrays
(shape)Initialise arrays/scalars passed to ufunc instances. setup
(shape[, dtype])Import mpi_array
module and assign toself.module
.teardown
(shape)Free arrays allocated during setup()
.time_array_array_op
(shape[, dtype])Timing for two input ufuncs (two array inputs). time_array_scalar_op
(shape[, dtype])Timing for two input ufuncs (one array input, one scalar input). try_import_for_setup
(module_name)Attempt to import module named module_name
, return the module if it exists and is importable.Attributes
a_ary
First input array. a_ary_range
A (low, high)
tuple indicating the uniform random range of scalars for thea_ary
array elements.b_ary
Second input array. b_ary_range
A (low, high)
tuple inficating the uniform random range of scalars for theb_ary
array elements.b_scalar
Second scalar input. c_ary
Output array. MpiArrayUfuncBench_add.cart_comm_dims
goal_time
module
The module
used to create array instances.param_names
params
random_state
A numpy.random.RandomState
instance, used to generate random values in arrays.repeat
ufunc
The numpy.ufunc
for this benchmark.warmup_time