From b07e09092a8a679ad05f50de069d80ae5c0b789e Mon Sep 17 00:00:00 2001 From: Olivier Coulaud Date: Thu, 1 Mar 2018 19:10:27 +0100 Subject: [PATCH] Remove initializer warnings --- Src/Kernels/Chebyshev/FChebSymM2LHandler.hpp | 14 ++++++----- .../Interpolation/FInterpSymmetries.hpp | 23 +++++++++++-------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/Src/Kernels/Chebyshev/FChebSymM2LHandler.hpp b/Src/Kernels/Chebyshev/FChebSymM2LHandler.hpp index 84104354..78e8fa4d 100644 --- a/Src/Kernels/Chebyshev/FChebSymM2LHandler.hpp +++ b/Src/Kernels/Chebyshev/FChebSymM2LHandler.hpp @@ -2,6 +2,7 @@ #ifndef FCHEBSYMM2LHANDLER_HPP #define FCHEBSYMM2LHANDLER_HPP +#include #include #include @@ -36,9 +37,10 @@ permutations of the 16 we compute in this function). Depending on whether FACASVD is defined or not, either ACA+SVD or only SVD is used to compress them. */ -template +template static void precompute(const MatrixKernelClass *const MatrixKernel, const FReal CellWidth, - const FReal Epsilon, FReal* K[343], int LowRank[343]) + const FReal Epsilon, ArrayK K, ArrayLr LowRank) +// const FReal Epsilon, FReal* K[343], int LowRank[343]) { // std::cout << "\nComputing 16 far-field interactions (l=" << ORDER << ", eps=" << Epsilon // << ") for cells of width w = " << CellWidth << std::endl; @@ -492,10 +494,10 @@ static void ComputeAndCompressAndStoreInBinaryFile(const MatrixKernelClass *cons static const unsigned int nnodes = ORDER*ORDER*ORDER; // compute and compress //////////// - FReal* K[343]; - int LowRank[343]; - for (unsigned int idx=0; idx<343; ++idx) - { K[idx] = nullptr; LowRank[idx] = 0; } + std::array K{}; + std::array LowRank{}; + // for (unsigned int idx=0; idx<343; ++idx) + // { K[idx] = nullptr; LowRank[idx] = 0; } precompute(MatrixKernel, FReal(2.), Epsilon, K, LowRank); // write to binary file //////////// diff --git a/Src/Kernels/Interpolation/FInterpSymmetries.hpp b/Src/Kernels/Interpolation/FInterpSymmetries.hpp index 3138664e..94fb78e0 100644 --- a/Src/Kernels/Interpolation/FInterpSymmetries.hpp +++ b/Src/Kernels/Interpolation/FInterpSymmetries.hpp @@ -48,8 +48,9 @@ class FInterpSymmetries // set quads and cones permutations unsigned int evn[ORDER], odd[ORDER]; - for (unsigned int o=0; o (u[perms[cidx][0]]+3)*7*7 + (u[perms[cidx][1]]+3)*7 + (u[perms[cidx][2]]+3); -- GitLab