numpartitions
Class: matlab.io.datastore.Partitionable
Namespace: matlab.io.datastore
Default number of partitions
Syntax
n = numpartitions(ds)
n = numpartitions(ds,pool)
Description
n = numpartitions(
returns the default
number of partitions for datastore ds
)ds
.
n = numpartitions(
returns a reasonable number of partitions to parallelize datastore access over the
parallel pool specified by ds
,pool
)pool
. To parallelize datastore access, you
must have Parallel Computing Toolbox™ installed.
Input Arguments
Examples
Tips
For your custom datastore implementation, we recommend that you do not implement the
numpartitions
method.
Algorithms
In the default implementation, the number of partitions, n
, is
selected as the minimum between these two values:
Value returned by the
maxpartitions
method on the datastore object.Three times the number of workers available.
Version History
Introduced in R2017b
See Also
matlab.io.datastore.Partitionable
| maxpartitions
| partition