Closed lambday closed 8 years ago
template <typename StorageType>
struct ComputationManagerBase
{
typedef StorageType::vector_type vector;
template<typename operation>
vector<typename operation::return_type> elementwise_compute(operation op)
{
for each i in data
compute op(i)
populate vector and return the result
}
vector<StorageType> data;
};
struct CPUComputationManager : struct ComputationManagerBase<SGMatrix<float64_t>>
{
};
struct GPUComputationManager : struct ComputationManagerBase<CGPUMatrix<float64_t>>
{
};
done