estimate_memory_usage#
- estimate_memory_usage(shape1, shape2, matching_method, ncores, analyzer_method=None, backend=None, float_nbytes=4, complex_nbytes=8, integer_nbytes=4)[source]#
Estimate the memory usage of a given template matching run.
- Parameters:
- shape1tuple
Shape of the target array.
- shape2tuple
Shape of the template array.
- matching_methodstr
Matching method used to compute scores.
- analyzer_methodstr, optional
Analyzer used for score analysis.
- backendstr, optional
Backend used for computation.
- ncoresint
The number of operations running in parallel.
- float_nbytesint
Byte size of used float, defaults to 4 (float32).
- complex_nbytesint
Byte size of used complex, defaults to 8 (complex64).
- integer_nbytesint
Byte size of used integer, defaults to 4 (int32).
- Returns:
- int
The estimated memory usage for the operation in bytes.
- Raises:
- ValueError
If an unsupported matching_method is provided.