atan2 function
Hi Klaus!
I was wondering if you would be able to add an atan2 function to Blaze?
Thanks!
Cheers,
Nils
Comments (6)
-
-
reporter Hi Klaus,
Thanks for sharing the code snippet and for considering the feature request! The ability to add custom functions with map is really awesome :)
Cheers,
Nils
-
-
assigned issue to
-
assigned issue to
-
- changed status to open
-
- changed status to resolved
Summary
The feature has been implemented, tested, optimized, and documented as required. It is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.3.
The atan2() Function
The multi-valued inverse tangent is available for a pair of dense vectors or matrices:
blaze::DynamicVector<double> a, b, c; c = atan2( a, b ); // Computes the componentwise multi-valued inverse tangent
blaze::DynamicMatrix<double> A, B, C; C = atan2( A, B ); // Computes the componentwise multi-valued inverse tangent
The operation is vectorized for SSE, AVX, and AVX-512 via the SVML. Additionally, the operation runs in parallel for large enough vectors and matrices (see for instance the OpenMP configuration).
-
reporter Hi Klaus,
That's fantastic! Thank you for getting around to this so quickly :)
Cheers,
Nils
- Log in to comment
Hi Nils!
Thanks a lot for the proposal. Since this feature will be based on the
map()
function, it will be added in the near future. Till then, please use the following implementation (which unfortunately doesn't provide vectorization):Best regards,
Klaus!