我正在做一些性能分析,我想知道,当数据类型已知(双精度)时,numpy
是否会对其标准数组操作进行矢量化.
a, b = (some numpy arrays)
c = a + b #Is this vectorized?
编辑:
我正在做一些性能分析,我想知道,当数据类型已知(双精度)时,numpy
是否会对其标准数组操作进行矢量化.
a, b = (some numpy arrays)
c = a + b #Is this vectorized?
编辑:
是的.
/*
* This file is for the definitions of simd vectorized operations.
*
* Currently contains sse2 functions that are built on amd64, x32 or
* non-generic builds (CFLAGS=-march=...)
* In future it may contain other instruction sets like AVX or NEON detected
* at runtime in which case it needs to be included indirectly via a file
* compiled with special options (or use gcc target attributes) so the binary
* stays portable.
*/