7 #ifndef OPENMPCD_CUDA_DEVICECODE_IMPLEMENTATIONDETAILS_NORMALMODE_HPP
8 #define OPENMPCD_CUDA_DEVICECODE_IMPLEMENTATIONDETAILS_NORMALMODE_HPP
14 #include <boost/static_assert.hpp>
15 #include <boost/type_traits/is_floating_point.hpp>
29 const unsigned int i,
const Vector3D<T>*
const vectors,
30 const std::size_t N,
const T shift)
32 BOOST_STATIC_ASSERT(boost::is_floating_point<T>::value);
41 const T argPart = T(i) / T(N);
42 for(std::size_t n = 1; n <= N; ++n)
44 const T arg = argPart * (n + shift);
54 const unsigned int i,
const T*
const vectors,
const std::size_t N,
57 BOOST_STATIC_ASSERT(boost::is_floating_point<T>::value);
66 const T argPart = T(i) / T(N);
67 for(std::size_t n = 1; n <= N; ++n)
80 const T*
const vectors,
const std::size_t N, T*
const result,
83 BOOST_STATIC_ASSERT(boost::is_floating_point<T>::value);
86 for(std::size_t i = 0; i <= N; ++i)
95 const unsigned int workUnitOffset,
96 const unsigned int chainLength,
97 const unsigned int chainCount,
98 const T*
const positions,
99 T*
const normalModeCoordinates,
102 BOOST_STATIC_ASSERT(boost::is_floating_point<T>::value);
109 const unsigned int chainID =
110 blockIdx.x * blockDim.x + threadIdx.x + workUnitOffset;
112 if(chainID >= chainCount)
116 positions + 3 * chainID * chainLength,
118 normalModeCoordinates + 3 * chainID * (chainLength + 1),
127 #endif //OPENMPCD_CUDA_DEVICECODE_IMPLEMENTATIONDETAILS_NORMALMODE_HPP