-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
Improve validation in loop_interchange_1 #7
Comments
Often in real cases not all code paths are covered. Any optimization can easily break something. It's a good honeypot in a too simple task to show reality. |
So Andrey, do you suggest that we don't duplicate code from |
I think we can use originalMultiply in validation.cpp to be more precise if current situation is so dramatic. |
The problem is not just a validation, it's also about clear separation between client's and core code. Originally, I edited // Assume this constant never changes
constexpr int N = 400;
// Square matrix 400 x 400
using Matrix = std::array<std::array<float, N>, N>;
void zero(Matrix &result);
void identity(Matrix &result);
void multiply(Matrix &result, const Matrix &a, const Matrix &b);
Matrix power(const Matrix &input, const uint32_t k);
void init(Matrix &matrix); Should be just: #include "problem.h" // Matrix and N are here now
Matrix power(const Matrix &input, const uint32_t k); |
Performance problems lay in solution.h and solution.cpp. Microoptimizations don't mean to use other algorithm or rewrite source code. Location of the performance issue is also unknown. Good job is to use information from the topic and use a profiler. All issues are topmost, not second order. |
Comment by @OleksandrKvl :
The text was updated successfully, but these errors were encountered: