Memory#
The sarcomp.memory
module provides functions for aligned memory allocation, array generation, and transposition operations. This module is optimized for high-performance computations, making it suitable for large-scale data processing tasks often encountered in Synthetic Aperture Radar (SAR) and other scientific computations.
Complex Array Types#
Sarcomp supports two different complex memory types:
Interleaved-Complex Representation#
This format is typically used by libraries like NumPy and represents complex numbers as an array of interleaved real and imaginary components, i.e., [re[0], im[0], re[1], im[1], …, re[n], im[n]]. While this format is common, it can lead to inefficiencies when implementing SIMD operations due to instruction overhead.
Split-Complex Representation#
This format stores the real and imaginary components of complex numbers in separate arrays. This can provide advantages in terms of data access patterns and manipulation, as it allows operations to be performed separately on the real and imaginary parts. This layout might outperform the interleaved-complex representation (NumPy format) in certain scenarios due to its optimized handling of SIMD operations.
Note
When choosing between split-complex and interleaved-complex representations, consider the specific computational requirements and performance characteristics of your application.
|
Create an empty array with the specified shape and data type, optionally padding to the next power of two. |
|
Create a copy of an array, optionally converting it to a different data type and zero-padding if requested. |
|
Create an array of zeros with the specified shape and data type, optionally padding to the next power of two. |
|
Convert an array to a specified target data type. |