|
19 | 19 | #include <algorithm> |
20 | 20 | #include <cmath> |
21 | 21 | #include <stdexcept> |
| 22 | +#include <utility> |
22 | 23 |
|
23 | 24 | namespace picsar::multi_physics::containers |
24 | 25 | { |
@@ -111,7 +112,7 @@ namespace details{ |
111 | 112 | m_x_min{x_min}, m_x_max{x_max}, m_x_size{x_max - x_min}, |
112 | 113 | m_how_many_x{static_cast<int>(values.size())}, |
113 | 114 | m_dx{m_x_size/(m_how_many_x-1)}, |
114 | | - m_values{values} |
| 115 | + m_values{std::move(values)} |
115 | 116 | { |
116 | 117 | //VectorType may need a call to a user-defined method for CPU-GPU synchronization |
117 | 118 | details::aux_sync_vec(m_values); |
@@ -439,7 +440,7 @@ namespace details{ |
439 | 440 | m_how_many_x{how_many_x}, m_how_many_y{how_many_y}, |
440 | 441 | m_dx{m_x_size/(m_how_many_x-1)}, |
441 | 442 | m_dy{m_y_size/(m_how_many_y-1)}, |
442 | | - m_values{values} |
| 443 | + m_values{std::move(values)} |
443 | 444 | { |
444 | 445 | //VectorType may need a call to a user-defined method for CPU-GPU synchronization |
445 | 446 | details::aux_sync_vec(m_values); |
@@ -986,7 +987,7 @@ namespace details{ |
986 | 987 | IXMapFunctor ix_map_functor, |
987 | 988 | IYMapFunctor iy_map_functor): |
988 | 989 | m_how_many_x{how_many_x}, m_how_many_y{how_many_y}, |
989 | | - m_values{values}, |
| 990 | + m_values{std::move(values)}, |
990 | 991 | m_x_map_functor{x_map_functor}, m_y_map_functor{y_map_functor}, |
991 | 992 | m_ix_map_functor{ix_map_functor}, m_iy_map_functor{iy_map_functor} |
992 | 993 | {} |
|
0 commit comments