Skip to content
Snippets Groups Projects

Refactoring Tensor

Closed laurent soulier requested to merge fix/TensorPIMPL into main
5 files
+ 201
54
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -62,7 +62,12 @@ class GenericOperator_Op
* @return template<class T> The parameter.
*/
template <class T>
T getParameter(std::string const &key) const {
const T& getParameter(std::string const &key) const {
return mParams.Get<const T>(key);
}
template <class T>
T& getParameter(std::string const &key) {
return mParams.Get<T>(key);
}
@@ -75,8 +80,8 @@ class GenericOperator_Op
/// internal buffer in a new location (previous value is still in memory at
/// its previous location)
template <class T>
void addParameter(std::string const &key, T const &value) {
mParams.Add<T>(key, value);
void addParameter(std::string const &key, T&& value) {
mParams.Add<T>(key, std::forward<T>(value));
}
Loading