Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

CUDAFastPBC.cu File Reference

CUDA kernels for fast PBC wrapping. More...

#include <stdio.h>
#include <thrust/scan.h>
#include <thrust/device_ptr.h>
#include <thrust/reduce.h>
#include <thrust/iterator/permutation_iterator.h>
#include <thrust/device_vector.h>
#include "FastPBC.h"

Go to the source code of this file.

Functions

__global__ void inverseboxsize (float *boxsize, float *invboxsize)
__global__ void repositionfragments (float *pos, int sellen, int *atomtofragmap, int *compoundmap, int *indexlist, float *boxsize, float *invboxsize)
__global__ void wrapcompound (float *pos, int sellen, float *center, int *atomtofragmap, int *indexlist, float *boxsize, float *invboxsize, float *fragcenters)
__global__ void wrapatomic (float *pos, int sellen, float *center, int *indexlist, float *boxsize, float *invboxsize)
__global__ void unwrapatomic (float *pos, float *prev, float *prevw, int sellen, int *indexlist, float *boxsize, float *invboxsize, float *oldboxsize, float *oldinvboxsize)
__global__ void fragmentperatom (int fnum, int *compoundmap, int *atomtofragmap)
__global__ void measurecenter (float *pos, float *center, int len, float *weights, int *weightidx, float *wscale)
__global__ void measurecenter_fullmass (float *pos, float *center, int len, float *weights, int *weightidx, float *wscale)
__global__ void computefragcenters (float *pos, float *centers, int fnum, float *weights, float *wscale, int *compoundmap, int *indexlist)
__global__ void fragwscale (float *fragscales, float *massarr, int fragnum, int *compoundmap, int *indexlist)
void fpbc_exec_unwrap (Molecule *mol, int first, int last, int sellen, int *indexlist)
 XXX the current implementation can't handle on-the-fly fall-back to CPU, and error handling is quite limited. More...

void fpbc_exec_wrapcompound (Molecule *mol, int first, int last, int fnum, int *compoundmap, int sellen, int *indexlist, float *weights, AtomSel *csel, float *center, float *massarr)
void fpbc_exec_wrapatomic (Molecule *mol, int first, int last, int sellen, int *indexlist, float *weights, AtomSel *csel, float *center)
void fpbc_exec_join (Molecule *mol, int first, int last, int fnum, int *compoundmap, int sellen, int *indexlist)
void fpbc_exec_recenter (Molecule *mol, int first, int last, int csellen, int *cindexlist, int fnum, int *compoundmap, int sellen, int *indexlist, float *weights, AtomSel *csel, float *massarr)


Detailed Description

CUDA kernels for fast PBC wrapping.

Definition in file CUDAFastPBC.cu.


Function Documentation

__global__ void computefragcenters float *    pos,
float *    centers,
int    fnum,
float *    weights,
float *    wscale,
int *    compoundmap,
int *    indexlist
 

Definition at line 211 of file CUDAFastPBC.cu.

void fpbc_exec_join Molecule   mol,
int    first,
int    last,
int    fnum,
int *    compoundmap,
int    sellen,
int *    indexlist
 

Definition at line 585 of file CUDAFastPBC.cu.

References Timestep::a_length, Timestep::b_length, Timestep::c_length, fpbc_exec_join, DrawMolecule::get_frame, BaseMolecule::nAtoms, and Timestep::pos.

void fpbc_exec_recenter Molecule   mol,
int    first,
int    last,
int    csellen,
int *    cindexlist,
int    fnum,
int *    compoundmap,
int    sellen,
int *    indexlist,
float *    weights,
AtomSel   csel,
float *    massarr
 

Definition at line 672 of file CUDAFastPBC.cu.

References Timestep::a_length, Timestep::b_length, Timestep::c_length, fpbc_exec_recenter_cpu, DrawMolecule::get_frame, measurecenter, measurecenter_fullmass, BaseMolecule::nAtoms, Timestep::pos, and AtomSel::selected.

void fpbc_exec_unwrap Molecule   mol,
int    first,
int    last,
int    sellen,
int *    indexlist
 

XXX the current implementation can't handle on-the-fly fall-back to CPU, and error handling is quite limited.

Definition at line 250 of file CUDAFastPBC.cu.

References Timestep::a_length, Timestep::b_length, Timestep::c_length, fpbc_exec_unwrap_cpu, DrawMolecule::get_frame, BaseMolecule::nAtoms, and Timestep::pos.

void fpbc_exec_wrapatomic Molecule   mol,
int    first,
int    last,
int    sellen,
int *    indexlist,
float *    weights,
AtomSel   csel,
float *    center
 

Definition at line 480 of file CUDAFastPBC.cu.

References Timestep::a_length, Timestep::b_length, Timestep::c_length, AtomSel::firstsel, fpbc_exec_wrapatomic_cpu, DrawMolecule::get_frame, AtomSel::lastsel, measurecenter, BaseMolecule::nAtoms, NULL, AtomSel::on, Timestep::pos, and AtomSel::selected.

void fpbc_exec_wrapcompound Molecule   mol,
int    first,
int    last,
int    fnum,
int *    compoundmap,
int    sellen,
int *    indexlist,
float *    weights,
AtomSel   csel,
float *    center,
float *    massarr
 

Definition at line 341 of file CUDAFastPBC.cu.

References Timestep::a_length, Timestep::b_length, Timestep::c_length, AtomSel::firstsel, fpbc_exec_wrapcompound_cpu, DrawMolecule::get_frame, AtomSel::lastsel, measurecenter_fullmass, BaseMolecule::nAtoms, NULL, AtomSel::on, Timestep::pos, and AtomSel::selected.

__global__ void fragmentperatom int    fnum,
int *    compoundmap,
int *    atomtofragmap
 

Definition at line 127 of file CUDAFastPBC.cu.

__global__ void fragwscale float *    fragscales,
float *    massarr,
int    fragnum,
int *    compoundmap,
int *    indexlist
 

Definition at line 232 of file CUDAFastPBC.cu.

__global__ void inverseboxsize float *    boxsize,
float *    invboxsize
 

Definition at line 32 of file CUDAFastPBC.cu.

__global__ void measurecenter float *    pos,
float *    center,
int    len,
float *    weights,
int *    weightidx,
float *    wscale
 

Definition at line 137 of file CUDAFastPBC.cu.

Referenced by fpbc_exec_recenter, and fpbc_exec_wrapatomic.

__global__ void measurecenter_fullmass float *    pos,
float *    center,
int    len,
float *    weights,
int *    weightidx,
float *    wscale
 

Definition at line 173 of file CUDAFastPBC.cu.

Referenced by fpbc_exec_recenter, and fpbc_exec_wrapcompound.

__global__ void repositionfragments float *    pos,
int    sellen,
int *    atomtofragmap,
int *    compoundmap,
int *    indexlist,
float *    boxsize,
float *    invboxsize
 

Definition at line 68 of file CUDAFastPBC.cu.

__global__ void unwrapatomic float *    pos,
float *    prev,
float *    prevw,
int    sellen,
int *    indexlist,
float *    boxsize,
float *    invboxsize,
float *    oldboxsize,
float *    oldinvboxsize
 

Definition at line 110 of file CUDAFastPBC.cu.

__global__ void wrapatomic float *    pos,
int    sellen,
float *    center,
int *    indexlist,
float *    boxsize,
float *    invboxsize
 

Definition at line 98 of file CUDAFastPBC.cu.

__global__ void wrapcompound float *    pos,
int    sellen,
float *    center,
int *    atomtofragmap,
int *    indexlist,
float *    boxsize,
float *    invboxsize,
float *    fragcenters
 

Definition at line 83 of file CUDAFastPBC.cu.


Generated on Fri Apr 19 02:45:45 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002