ddemidov / vexcl

@@ -87,8 +87,8 @@
Loading
87 87
        }
88 88
89 89
        std::vector<double>  data(i.size());
90 -
        vex::gather<double>  get(ctx, x.size(), i);
91 -
        vex::scatter<double> put(ctx, x.size(), i);
90 +
        vex::gather  get(ctx, x.size(), i);
91 +
        vex::scatter put(ctx, x.size(), i);
92 92
93 93
        get(X, data);
94 94

@@ -43,7 +43,6 @@
Loading
43 43
44 44
namespace detail {
45 45
46 -
template <class T>
47 46
class index_partition {
48 47
    public:
49 48
        index_partition(
@@ -88,8 +87,7 @@
Loading
88 87
} // namespace detail
89 88
90 89
/// Gathers vector elements at specified indices.
91 -
template <typename T>
92 -
class gather : protected detail::index_partition<T> {
90 +
class gather : protected detail::index_partition {
93 91
    public:
94 92
        /// Constructor.
95 93
        /**
@@ -103,12 +101,10 @@
Loading
103 101
        {}
104 102
105 103
        /// Gather elements of device vector into host vector.
106 -
        template <class HostVector>
104 +
        template <class T, class HostVector>
107 105
        void operator()(const vex::vector<T> &src, HostVector &dst) {
108 106
            using namespace detail;
109 107
110 -
            static kernel_cache cache;
111 -
112 108
            for(unsigned d = 0; d < Base::queue.size(); d++) {
113 109
                if (size_t n = Base::ptr[d + 1] - Base::ptr[d]) {
114 110
                    auto s = src.map(d);
@@ -124,12 +120,11 @@
Loading
124 120
            }
125 121
        }
126 122
    private:
127 -
        typedef detail::index_partition<T> Base;
123 +
        typedef detail::index_partition Base;
128 124
};
129 125
130 126
/// Scatters vector elements to specified indices.
131 -
template <typename T>
132 -
class scatter : protected detail::index_partition<T> {
127 +
class scatter : protected detail::index_partition {
133 128
    public:
134 129
        /// Constructor.
135 130
        /**
@@ -143,12 +138,10 @@
Loading
143 138
        {}
144 139
145 140
        /// Scatter elements of host vector to device vector.
146 -
        template <class HostVector>
141 +
        template <class HostVector, class T>
147 142
        void operator()(const HostVector &src, vex::vector<T> &dst) {
148 143
            using namespace detail;
149 144
150 -
            static kernel_cache cache;
151 -
152 145
            for(unsigned d = 0; d < Base::queue.size(); d++) {
153 146
                if (size_t n = Base::ptr[d + 1] - Base::ptr[d]) {
154 147
                    auto v = dst.map(d);
@@ -163,7 +156,7 @@
Loading
163 156
            }
164 157
        }
165 158
    private:
166 -
        typedef detail::index_partition<T> Base;
159 +
        typedef detail::index_partition Base;
167 160
};
168 161
169 162
} // namespace vex
Files Coverage
tests 99.61%
vexcl 94.82%
CL/cl.hpp 85.20%
examples/devlist.cpp 94.59%
Project Totals (114 files) 95.37%
1431.9
TRAVIS_OS_NAME=osx
1431.7
TRAVIS_OS_NAME=osx
1431.1
TRAVIS_OS_NAME=linux
1431.3
TRAVIS_OS_NAME=linux

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading