Skip to content
Snippets Groups Projects
Commit d7f36dc3 authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'KLMixture_use_alligned' into 'master'

KLMixture: Use ctor with num of elements

See merge request atlas/athena!35693
parents cea6a78c 3d670fe2
No related branches found
No related tags found
No related merge requests found
......@@ -196,14 +196,12 @@ findMerges(Component1D* componentsIn,
const int32_t n = inputSize;
const int32_t nn = n * (n - 1) / 2;
// Create a trianular mapping for the pairwise distances
std::vector<triangularToIJ> convert;
convert.reserve(nn);
// We now that the size is nn
std::vector<triangularToIJ> convert(nn);
for (int32_t i = 1; i < n; ++i) {
const int indexConst = (i - 1) * i / 2;
for (int32_t j = 0; j < i; ++j) {
int32_t index = indexConst + j;
convert[index] = { i, j };
convert[indexConst + j] = { i, j };
}
}
// We need to work with multiple of 8, in principle this is a requirement
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment