Compare ff5a27d ... +5 ... fefaf2f

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 9 of 63 files from the diff.
Other files ignored by Codecov
CMakeLists.txt has changed.
conanfile.txt has changed.
.travis.yml has changed.

@@ -7,7 +7,7 @@
Loading
7 7
#include <arrayfire.h>
8 8
#include <khiva/library.h>
9 9
10 -
#include "libraryInternal.h"
10 +
#include "khiva/internal/libraryInternal.h"
11 11
12 12
std::string khiva::library::backendInfo() { return af::infoString(); }
13 13

@@ -7,6 +7,7 @@
Loading
7 7
#include <khiva/regression.h>
8 8
#include <khiva/statistics.h>
9 9
#include <boost/math/distributions/students_t.hpp>
10 +
#include <khiva/internal/scopedHostPtr.h>
10 11
11 12
#define EPSILON 1e-20
12 13
@@ -55,10 +56,10 @@
Loading
55 56
    // It would be better to move this computation to the GPU
56 57
    // Converting to af::dtype::f32 and back to the original type later on
57 58
    // to avoid templating this function and all the ones using it
58 -
    float *aux = af::abs(t).as(af::dtype::f32).host<float>();
59 +
    auto aux = khiva::utils::makeScopedHostPtr(af::abs(t).as(af::dtype::f32).host<float>());
59 60
    for (long i = 0; i < t.dims(1); i++) {
60 61
        aux[i] = 2.0f * (1.0f - static_cast<float>(boost::math::cdf(dist, aux[i])));
61 62
    }
62 -
    pvalue = af::array(1, t.dims(1), aux).as(xss.type());
63 +
    pvalue = af::array(1, t.dims(1), aux.get()).as(xss.type());
63 64
    stderrest = af::sqrt((1 - af::pow(r, 2)) * ssym / ssxm / df);
64 65
}

@@ -7,6 +7,7 @@
Loading
7 7
#include <khiva/linalg.h>
8 8
#include <khiva/polynomial.h>
9 9
#include <Eigen/Eigenvalues>
10 +
#include <khiva/internal/scopedHostPtr.h>
10 11
11 12
using namespace Eigen;
12 13
@@ -48,14 +49,14 @@
Loading
48 49
        p = (-1 * p(af::seq(1, static_cast<double>(p.dims(0)) - 1), af::span)) /
49 50
            af::tile(p(0, af::span), static_cast<unsigned int>(p.dims(0)) - 1);
50 51
51 -
        float *coeffs = p.as(af::dtype::f32).host<float>();
52 +
        auto coeffs = khiva::utils::makeScopedHostPtr(p.as(af::dtype::f32).host<float>());
52 53
53 54
        Eigen::VectorXf vec = Eigen::VectorXf::Ones(p.dims(0));
54 55
        Eigen::MatrixXf diag = vec.asDiagonal();
55 56
56 57
        Eigen::MatrixXf diag2(diag.rows(), diag.cols());
57 58
        int rest = static_cast<int>(diag.rows()) - 1;
58 -
        diag2.topRows(1) = Eigen::Map<Eigen::MatrixXf>(coeffs, 1, p.dims(0));
59 +
        diag2.topRows(1) = Eigen::Map<Eigen::MatrixXf>(coeffs.get(), 1, p.dims(0));
59 60
        diag2.bottomRows(rest) = diag.topRows(rest);
60 61
61 62
        Eigen::VectorXcf eivals = diag2.eigenvalues();

@@ -4,7 +4,7 @@
Loading
4 4
// License, v. 2.0. If a copy of the MPL was not distributed with this
5 5
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 6
7 -
#include "libraryInternal.h"
7 +
#include "khiva/internal/libraryInternal.h"
8 8
9 9
#include <cmath>
10 10

@@ -725,7 +725,7 @@
Loading
725 725
    return result;
726 726
}
727 727
728 -
std::vector<LineTuple> identifyRidgeLines(af::array cwt_tss, khiva::array::Array<float> maxDistances, float gapThresh) {
728 +
std::vector<LineTuple> identifyRidgeLines(af::array cwt_tss, const khiva::array::Array<float>& maxDistances, float gapThresh) {
729 729
    std::vector<LineTuple> outLines;
730 730
731 731
    // Gets all local maximals
@@ -863,7 +863,7 @@
Loading
863 863
}
864 864
865 865
std::vector<LineTuple> filterFunction(std::vector<LineTuple> ridgeLines, std::vector<float> noises,
866 -
                                      khiva::array::Array<float> cwt, int minSnr, int minLength) {
866 +
                                      const khiva::array::Array<float>& cwt, int minSnr, int minLength) {
867 867
    std::vector<LineTuple> res;
868 868
869 869
    for (auto line : ridgeLines) {

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Learn more Showing 1 files with coverage changes found.

Changes in src/khiva/array.cpp
-1
+1
Loading file...
Files Coverage
src/khiva -0.07% 97.25%
Project Totals (16 files) 97.25%
Loading