"platforms/cuda/include/CudaKernelFactory.h" did not exist on "506430585d73f9e7fb45061f8483d683237d2a69"
customIntegratorPerDof.cl 796 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
__kernel void computePerDof(__global float4* restrict posq, __global float4* restrict posDelta, __global float4* restrict velm,
        __global const float4* restrict force, __global const float2* restrict dt, __global const float* restrict globals,
        __global const float4* restrict random, unsigned int randomIndex, float energy
        PARAMETER_ARGUMENTS) {
    float stepSize = dt[0].y;
    int index = get_global_id(0);
    randomIndex += index;
    while (index < NUM_ATOMS) {
        float4 position = posq[index];
        float4 velocity = velm[index];
        float4 f = force[index];
        float4 gaussian = random[randomIndex];
        float mass = 1.0f/velocity.w;
        COMPUTE_STEP
        randomIndex += get_global_size(0);
        index += get_global_size(0);
    }
}