"serialization/vscode:/vscode.git/clone" did not exist on "6aa09a5adbce7eb831099c5db0084e77ad5f1ed5"
customGBGradientChainRule.cl 515 Bytes
Newer Older
Peter Eastman's avatar
Peter Eastman committed
1
2
3
4
/**
 * Compute chain rule terms for computed values that depend explicitly on particle coordinates.
 */

5
__kernel void computeGradientChainRuleTerms(__global float4* restrict forceBuffers, __global const float4* restrict posq
Peter Eastman's avatar
Peter Eastman committed
6
7
8
9
10
11
12
13
14
15
        PARAMETER_ARGUMENTS) {
    unsigned int index = get_global_id(0);
    while (index < NUM_ATOMS) {
        float4 pos = posq[index];
        float4 force = forceBuffers[index];
        COMPUTE_FORCES
        forceBuffers[index] = force;
        index += get_global_size(0);
    }
}