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

LAGraph: Use compile-time checks for size of uintptr_t #470

Merged
merged 1 commit into from
Oct 26, 2023

Commits on Oct 26, 2023

  1. LAGraph: Use compile-time checks for size of uintptr_t

    Instead of checking the size of `uintptr_t` on run-time (inside a loop),
    move that check to the preprocessor. That way code that will never be
    executed isn't compiled.
    
    Modern compilers might be able to optimize the checks and code paths
    away that will never be executed, there is no guarantees they will do
    that.
    
    I hope it is ok to check at compile time if the pointer size is neither
    32-bit nor 64-bit. (Compilation will likely fail at other points anyway
    if that should be the case.)
    mmuetzel committed Oct 26, 2023
    Configuration menu
    Copy the full SHA
    4c6e9e4 View commit details
    Browse the repository at this point in the history