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

CUDAVolCPotential.cu File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cuda.h>
#include "utilities.h"
#include "VMDThreads.h"
#include "CUDAKernels.h"

Go to the source code of this file.

Compounds

struct  enthrparms

Defines

#define CUERR
#define MAXATOMS   4000
#define UNROLLX   8
#define UNROLLY   1
#define BLOCKSIZEX   8
#define BLOCKSIZEY   8
#define BLOCKSIZE   (BLOCKSIZEX*BLOCKSIZEY)
#define FLOPSPERATOMEVAL   (59.0/8.0)
#define TILESIZEX   BLOCKSIZEX*UNROLLX
#define TILESIZEY   BLOCKSIZEY*UNROLLY
#define GPU_X_ALIGNMASK   (TILESIZEX - 1)
#define GPU_Y_ALIGNMASK   (TILESIZEY - 1)
#define DMABUFPADSIZE   (32 * 1024)

Functions

void * cudaenergythread (void *)
__global__ void cenergy (int numatoms, float gridspacing, float *energygrid)
int copyatomstoconstbuf (const float *atoms, float *atompre, int count, float zplane)
int vmd_cuda_vol_cpotential (long int natoms, float *atoms, float *grideners, long int numplane, long int numcol, long int numpt, float gridspacing)

Variables

__constant__ float4 atominfo [MAXATOMS]


Define Documentation

#define BLOCKSIZE   (BLOCKSIZEX*BLOCKSIZEY)
 

Definition at line 112 of file CUDAVolCPotential.cu.

#define BLOCKSIZEX   8
 

Definition at line 95 of file CUDAVolCPotential.cu.

Referenced by cenergy, and cudaenergythread.

#define BLOCKSIZEY   8
 

Definition at line 96 of file CUDAVolCPotential.cu.

Referenced by cudaenergythread.

#define CUERR
 

Value:

{ cudaError_t err; \
  if ((err = cudaGetLastError()) != cudaSuccess) { \
  printf("CUDA error: %s, line %d\n", cudaGetErrorString(err), __LINE__); \
  printf("Thread aborting...\n"); \
  return NULL; }}

Definition at line 46 of file CUDAVolCPotential.cu.

Referenced by copyatomstoconstbuf, and cudaenergythread.

#define DMABUFPADSIZE   (32 * 1024)
 

#define FLOPSPERATOMEVAL   (59.0/8.0)
 

Definition at line 116 of file CUDAVolCPotential.cu.

Referenced by vmd_cuda_vol_cpotential.

#define GPU_X_ALIGNMASK   (TILESIZEX - 1)
 

Definition at line 198 of file CUDAVolCPotential.cu.

Referenced by cudaenergythread, and vmd_cuda_vol_cpotential.

#define GPU_Y_ALIGNMASK   (TILESIZEY - 1)
 

Definition at line 199 of file CUDAVolCPotential.cu.

Referenced by cudaenergythread, and vmd_cuda_vol_cpotential.

#define MAXATOMS   4000
 

Definition at line 59 of file CUDAVolCPotential.cu.

Referenced by copyatomstoconstbuf, and cudaenergythread.

#define TILESIZEX   BLOCKSIZEX*UNROLLX
 

Definition at line 196 of file CUDAVolCPotential.cu.

#define TILESIZEY   BLOCKSIZEY*UNROLLY
 

Definition at line 197 of file CUDAVolCPotential.cu.

#define UNROLLX   8
 

Definition at line 93 of file CUDAVolCPotential.cu.

Referenced by cenergy, and cudaenergythread.

#define UNROLLY   1
 

Definition at line 94 of file CUDAVolCPotential.cu.

Referenced by cudaenergythread.


Function Documentation

__global__ void cenergy int    numatoms,
float    gridspacing,
float *    energygrid
[static]
 

Definition at line 121 of file CUDAVolCPotential.cu.

References atominfo, BLOCKSIZEX, and UNROLLX.

int copyatomstoconstbuf const float *    atoms,
float *    atompre,
int    count,
float    zplane
 

Definition at line 201 of file CUDAVolCPotential.cu.

References atominfo, CUERR, and MAXATOMS.

Referenced by cudaenergythread.

void * cudaenergythread void *    [static]
 

Definition at line 314 of file CUDAVolCPotential.cu.

References enthrparms::atoms, BLOCKSIZEX, BLOCKSIZEY, copyatomstoconstbuf, CUERR, GPU_X_ALIGNMASK, GPU_Y_ALIGNMASK, enthrparms::grideners, enthrparms::gridspacing, MAXATOMS, msg_timer_create, msg_timer_destroy, msg_timer_timeout, enthrparms::natoms, NULL, enthrparms::numcol, enthrparms::numplane, enthrparms::numpt, enthrparms::threadcount, enthrparms::threadid, UNROLLX, UNROLLY, vmd_timer_create, vmd_timer_destroy, vmd_timer_start, vmd_timer_timenow, and vmd_timerhandle.

Referenced by vmd_cuda_vol_cpotential.

int vmd_cuda_vol_cpotential long int    natoms,
float *    atoms,
float *    grideners,
long int    numplane,
long int    numcol,
long int    numpt,
float    gridspacing
 

Definition at line 223 of file CUDAVolCPotential.cu.

References enthrparms::atoms, cudaenergythread, FLOPSPERATOMEVAL, GPU_X_ALIGNMASK, GPU_Y_ALIGNMASK, enthrparms::grideners, enthrparms::gridspacing, enthrparms::natoms, NULL, enthrparms::numcol, enthrparms::numplane, enthrparms::numpt, enthrparms::threadcount, enthrparms::threadid, vmd_cuda_num_devices, vmd_thread_create, vmd_thread_join, vmd_thread_numprocessors, vmd_thread_t, vmd_timer_create, vmd_timer_destroy, vmd_timer_start, vmd_timer_stop, vmd_timer_time, and vmd_timerhandle.

Referenced by vol_cpotential.


Variable Documentation

__constant__ float4 atominfo[MAXATOMS] [static]
 

Definition at line 60 of file CUDAVolCPotential.cu.

Referenced by cenergy, and copyatomstoconstbuf.


Generated on Sun Jul 6 01:28:03 2008 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002