11 static_assert(std::is_same<T, float>::value ||
12 std::is_same<T, double>::value,
13 "Only float and double supported");
17 typename GSLTemplateTypeAlias<T>::VectorType;
21 throw std::runtime_error(
"Weight vector size must be > 0");
28 for (
size_t i = 0;
i <
size; ++
i)
38 if (_freeMemory && _ownedPtr) {
43 const GSLVectorType* get()
const {
return _ptr; }
45 operator const GSLVectorType*()
const {
return _ptr; }
48 const GSLVectorType* _ptr =
nullptr;
49 GSLVectorType* _ownedPtr =
nullptr;
50 bool _freeMemory =
false;