Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix no-complex build for bml_elemental code #649

Merged
merged 1 commit into from
Aug 5, 2022

Conversation

jeanlucf22
Copy link
Collaborator

No description provided.

@@ -77,7 +79,7 @@ bml_get_element_double_real(
* \param A The bml matrix
* \return The matrix element
*/
float complex
float _Complex
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change that to _Complex? They are the same but we are using complex everywhere else in the library.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah true, I missed that. But we are also using complex here

float complex
bml_get_element_ellpack_single_complex(
bml_matrix_ellpack_t * A,
int i,
int j)

for example.

Let's merge this PR then as it is and then follow up with a clean up so that the use of comple / _Complex is consistent throughout.

While _Complex is equivalent to complex the former is never mentioned in any API documentation. For example:

CABS(3)

NAME
       cabs, cabsf, cabsl - absolute value of a complex number

SYNOPSIS
       #include <complex.h>

       double cabs(double complex z);
       float cabsf(float complex z);
       long double cabsl(long double complex z);

       Link with -lm.

Also, symbols with preceding _ are typically interpreted as internal symbols not meant for external use.

To make a long story short, I would prefer the consistent use of complex 😄

@nicolasbock nicolasbock merged commit 4f4281e into lanl:master Aug 5, 2022
@jeanlucf22 jeanlucf22 deleted the nocomplex_elemental branch January 20, 2023 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants