File tree 2 files changed +4
-7
lines changed
librapid/include/librapid
2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -378,7 +378,7 @@ namespace librapid {
378
378
if (this != &other) {
379
379
size_t oldSize = m_size;
380
380
m_size = other.m_size ;
381
- if (other. m_size != m_size) LIBRAPID_UNLIKELY {
381
+ if (oldSize != m_size) LIBRAPID_UNLIKELY {
382
382
if (m_ownsData) LIBRAPID_LIKELY {
383
383
// Reallocate
384
384
detail::cudaSafeDeallocate (m_begin);
Original file line number Diff line number Diff line change @@ -175,8 +175,7 @@ namespace librapid {
175
175
176
176
LIBRAPID_ALWAYS_INLINE OpenCLStorage &operator =(const OpenCLStorage &other);
177
177
178
- LIBRAPID_ALWAYS_INLINE OpenCLStorage &
179
- operator =(OpenCLStorage &&other) noexcept ;
178
+ LIBRAPID_ALWAYS_INLINE OpenCLStorage &operator =(OpenCLStorage &&other) noexcept ;
180
179
181
180
void set (const OpenCLStorage &other);
182
181
@@ -217,7 +216,6 @@ namespace librapid {
217
216
LIBRAPID_NODISCARD LIBRAPID_ALWAYS_INLINE cl::Buffer &data ();
218
217
219
218
private:
220
-
221
219
SizeType m_size;
222
220
cl::Buffer m_buffer;
223
221
bool m_ownsData = true ;
@@ -290,7 +288,7 @@ namespace librapid {
290
288
if (this != &other) {
291
289
size_t oldSize = m_size;
292
290
m_size = other.m_size ;
293
- if (other. m_size != m_size) LIBRAPID_UNLIKELY {
291
+ if (oldSize != m_size) LIBRAPID_UNLIKELY {
294
292
if (m_ownsData) LIBRAPID_LIKELY {
295
293
m_buffer = cl::Buffer (
296
294
global::openCLContext, bufferFlags, m_size * sizeof (Scalar));
@@ -309,8 +307,7 @@ namespace librapid {
309
307
}
310
308
311
309
template <typename Scalar>
312
- OpenCLStorage<Scalar> &
313
- OpenCLStorage<Scalar>::operator =(OpenCLStorage &&other) noexcept {
310
+ OpenCLStorage<Scalar> &OpenCLStorage<Scalar>::operator =(OpenCLStorage &&other) noexcept {
314
311
LIBRAPID_CHECK_OPENCL;
315
312
if (this != &other) {
316
313
m_size = std::move (other.m_size );
You can’t perform that action at this time.
0 commit comments