-
Notifications
You must be signed in to change notification settings - Fork 274
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
[ParU] Use more C++ #515
[ParU] Use more C++ #515
Conversation
These changes look good to me. |
Thanks for the update. A few comments: I can't use a bare SuiteSparse/ParU/Source/paru_internal.hpp Lines 21 to 26 in 19f1109
That is, I intentionally make it very hard to turn on debugging, since if it gets turned on by mistake by an end user, then my codes can be 1000x slower, or worse. Then when I release the code, I force debug off by editing the code back. And then sometimes I will revise the ASSERT macro so that it does something else, with a more informative error message, while developing the code. |
Yes, in general, The Control->paru_max_threads should be a plain int (or perhaps int32_t) anyway. That would simplify this particular case for std::min and std::max. This isn't a performance issue in this case, though. For the for loops -- do they affect how OpenMP handles the loop? I haven't reviewed all the changes yet, though. I haven't used that style of for loop for a |
Remove ParU's own C macros MIN and MAX.
NULL is defined by C++. The definition of NULL as void* is not allowed by C++.
Less code, easier to read, less possibilites to make mistakes. Found by clang-tidy.
Drop variable *el, use elementList[e] directly. Replace using "continue" by inverted if condition and moving the remaining code in the if block.
438bcfb
to
a684309
Compare
looks great -- thanks! |
a676c46
into
DrTimothyAldenDavis:dev2
Replace C code by C++ code.
If you are unhappy with some of the commits, I can remove them and create separate pull requests.