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

STYLE: Declared m_ComputePerThreadVariables as an std::vector (2 x) #644

Merged
merged 1 commit into from
May 6, 2022

Conversation

N-Dekker
Copy link
Member

@N-Dekker N-Dekker commented May 5, 2022

Declared m_ComputePerThreadVariables of both as AdvancedImageMomentsCalculator and ComputeDisplacementDistribution as an std::vector<AlignedComputePerThreadStruct>, instead of a raw pointer to the structs. Simplified zero-initialization of the structs. Removed manual delete[] statements.

Based on the second commit of pull request #132 "Improved style of m_ComputePerThreadVariable data members".

Follows C++ Core Guidelines (April 10, 2022): "Avoid calling new and delete explicitly" http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-ptr

Declared m_ComputePerThreadVariables of both as `AdvancedImageMomentsCalculator` and `ComputeDisplacementDistribution` as an `std::vector<AlignedComputePerThreadStruct>`, instead of a raw pointer to the structs. Simplified zero-initialization of the structs. Removed manual `delete[]` statements.

Based on the second commit of pull request #132 "Improved style of m_ComputePerThreadVariable data members".

Follows C++ Core Guidelines (April 10, 2022): "Avoid calling new and delete explicitly" http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-ptr
@N-Dekker N-Dekker force-pushed the m_ComputePerThreadVariables-vector branch from 6bfd8ac to fc696f8 Compare May 5, 2022 21:32
@N-Dekker N-Dekker merged commit 398cea9 into develop May 6, 2022
@N-Dekker N-Dekker deleted the m_ComputePerThreadVariables-vector branch May 6, 2022 09:01
N-Dekker added a commit that referenced this pull request May 12, 2022
Follow-up to pull request #644 commit 398cea9 "STYLE: Declared `m_ComputePerThreadVariables` as an `std::vector` (2 x)"
N-Dekker added a commit that referenced this pull request May 12, 2022
Instead of declaring these "PerThreadVariables" data members as raw pointers, of four `Metric` types. Removed the corresponding "PerThreadVariablesSize" data members. Defaulted ( `= default`) their destructors.Replaced `for (ThreadIdType i = 0; i < numberOfThreads; ++i)` loops by range-based for-loops.

Follow-up to pull request #644 commit 398cea9 "STYLE: Declared `m_ComputePerThreadVariables` as an `std::vector` (2 x)"
N-Dekker added a commit that referenced this pull request May 16, 2022
Instead of declaring these "PerThreadVariables" data members as raw pointers, of four `Metric` types. Removed the corresponding "PerThreadVariablesSize" data members. Defaulted ( `= default`) their destructors.Replaced `for (ThreadIdType i = 0; i < numberOfThreads; ++i)` loops by range-based for-loops.

Follow-up to pull request #644 commit 398cea9 "STYLE: Declared `m_ComputePerThreadVariables` as an `std::vector` (2 x)"
N-Dekker added a commit that referenced this pull request May 17, 2022
Instead of declaring these "PerThreadVariables" data members as raw pointers, of four `Metric` types. Removed the corresponding "PerThreadVariablesSize" data members. Defaulted ( `= default`) their destructors.Replaced `for (ThreadIdType i = 0; i < numberOfThreads; ++i)` loops by range-based for-loops.

Follow-up to pull request #644 commit 398cea9 "STYLE: Declared `m_ComputePerThreadVariables` as an `std::vector` (2 x)"
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.

1 participant