8 #ifndef GPU_PRECISION_H_
9 #define GPU_PRECISION_H_
11 template<
typename T,
typename F>
12 inline void beagleMemCpy( T* to, F* from,
unsigned int length )
14 for(
unsigned int m=0; m<length; m++)
19 inline void beagleMemCpy( F* to,
const F* from,
unsigned int length )
21 memcpy( to, from, length*
sizeof(F) );
25 inline const F* beagleCastIfNecessary(
const F* from, F* cache,
26 unsigned int length) {
30 template<
typename T,
typename F>
31 inline const T* beagleCastIfNecessary(
const F* from, T* cache,
32 unsigned int length) {
33 beagleMemCpy(cache, from, length);