customGBValuePerParticle.cc 516 Bytes
Newer Older
1
2
3
4
/**
 * Reduce a pairwise computed value, and compute per-particle values.
 */

5
6
KERNEL void computePerParticleValues(GLOBAL real4* posq,
        GLOBAL mm_long* valueBuffers
7
        PARAMETER_ARGUMENTS) {
8
    for (int index = GLOBAL_ID; index < NUM_ATOMS; index += GLOBAL_SIZE) {
9
10
        // Reduce the pairwise value

11
        real sum = valueBuffers[index]/(real) 0x100000000;
12
        REDUCE_PARAM0_DERIV
13
        
14
15
        // Now calculate other values

16
        real4 pos = posq[index];
17
18
19
        COMPUTE_VALUES
    }
}