31 #ifndef ALLOC_RESULT_UTIL_H_
32 #define ALLOC_RESULT_UTIL_H_
39 #endif // HAVE_VIENNACL
55 template <
class Operand,
class ReturnType>
65 static ReturnType
alloc(Operand op)
67 return ReturnType(op.size());
76 template <
typename T,
typename ST>
97 template <
typename T,
typename ST>
98 struct allocate_result<CGPUMatrix<T>, CGPUMatrix<ST>>
106 static CGPUMatrix<ST>
alloc(CGPUMatrix<T> m)
108 return CGPUMatrix<ST>(m.num_rows, m.num_cols);
111 #endif // HAVE_VIENNACL
118 #endif // ALLOC_RESULT_UTIL_H_
Template struct allocate_result for allocating objects of return type for element-wise operations...
static SGMatrix< ST > alloc(SGMatrix< T > m)
all of classes and functions are contained in the shogun namespace
static ReturnType alloc(Operand op)