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

CUDAQuickSurf.cu File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cuda.h>
#include "Inform.h"
#include "utilities.h"
#include "WKFThreads.h"
#include "WKFUtils.h"
#include "CUDAKernels.h"
#include "CUDAMarchingCubes.h"
#include "CUDAQuickSurf.h"
#include "DispCmds.h"
#include "VMDDisplayList.h"
#include <thrust/sort.h>

Go to the source code of this file.

Compounds

struct  enthrparms
struct  qsurf_gpuhandle

Defines

#define CUERR
#define DUNROLLX   8
#define DBLOCKSZX   8
#define DBLOCKSZY   8
#define DBLOCKSZ   (DBLOCKSZX*DBLOCKSZY)
#define FLOPSPERATOMEVALTEX   (109.0/8.0)
#define FLOPSPERATOMEVAL   (53.0/8.0)
#define TILESIZEX   DBLOCKSZX*DUNROLLX
#define TILESIZEY   DBLOCKSZY
#define GPU_X_ALIGNMASK   (TILESIZEX - 1)
#define GPU_Y_ALIGNMASK   (TILESIZEY - 1)
#define GRID_CELL_EMPTY   0xffffffff
#define GGRIDSZ   8.0f
#define GBLOCKSZX   8
#define GBLOCKSZY   8
#define GTEXBLOCKSZZ   2
#define GTEXUNROLL   4
#define GBLOCKSZZ   2
#define GUNROLL   4

Functions

void * cudadensitythread (void *)
__global__ void gaussdensity_direct_tex (int natoms, const float4 *xyzr, const float4 *colors, float gridspacing, unsigned int z, float *densitygrid, float3 *voltexmap, float invisovalue)
__global__ void gaussdensity_direct (int natoms, const float4 *xyzr, float gridspacing, unsigned int z, float *densitygrid)
int vmd_cuda_gaussdensity_direct (long int natoms, float4 *xyzr, float4 *colors, float *volmap, float *voltexmap, int3 volsz, float radscale, float gridspacing, float isovalue, float gausslim)
__global__ void hashAtoms (unsigned int natoms, const float4 *xyzr, int3 numvoxels, float invgridspacing, unsigned int *atomIndex, unsigned int *atomHash)
__global__ void sortAtomsGenCellLists (unsigned int natoms, const float4 *xyzr_d, const float4 *color_d, const unsigned int *atomIndex_d, const unsigned int *atomHash_d, float4 *sorted_xyzr_d, float4 *sorted_color_d, uint2 *cellStartEnd_d)
int vmd_cuda_build_density_atom_grid (int natoms, const float4 *xyzr_d, const float4 *color_d, float4 *sorted_xyzr_d, float4 *sorted_color_d, unsigned int *atomIndex_d, unsigned int *atomHash_d, uint2 *cellStartEnd_d, int3 volsz, float invgridspacing)
__global__ void gaussdensity_fast_tex (int natoms, const float4 *sorted_xyzr, const float4 *sorted_color, int3 numvoxels, int3 acncells, float acgridspacing, float invacgridspacing, const uint2 *cellStartEnd, float gridspacing, unsigned int z, float *densitygrid, float3 *voltexmap, float invisovalue)
__global__ void gaussdensity_fast (int natoms, const float4 *sorted_xyzr, int3 numvoxels, int3 acncells, float acgridspacing, float invacgridspacing, const uint2 *cellStartEnd, float gridspacing, unsigned int z, float *densitygrid)


Define Documentation

#define CUERR
 

Value:

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

Definition at line 63 of file CUDAQuickSurf.cu.

Referenced by cudadensitythread.

#define DBLOCKSZ   (DBLOCKSZX*DBLOCKSZY)
 

Definition at line 89 of file CUDAQuickSurf.cu.

#define DBLOCKSZX   8
 

Definition at line 78 of file CUDAQuickSurf.cu.

Referenced by cudadensitythread, gaussdensity_direct, and gaussdensity_direct_tex.

#define DBLOCKSZY   8
 

Definition at line 79 of file CUDAQuickSurf.cu.

Referenced by cudadensitythread.

#define DUNROLLX   8
 

Definition at line 77 of file CUDAQuickSurf.cu.

Referenced by cudadensitythread, gaussdensity_direct, and gaussdensity_direct_tex.

#define FLOPSPERATOMEVAL   (53.0/8.0)
 

Definition at line 94 of file CUDAQuickSurf.cu.

Referenced by vmd_cuda_gaussdensity_direct.

#define FLOPSPERATOMEVALTEX   (109.0/8.0)
 

Definition at line 93 of file CUDAQuickSurf.cu.

Referenced by vmd_cuda_gaussdensity_direct.

#define GBLOCKSZX   8
 

Definition at line 812 of file CUDAQuickSurf.cu.

Referenced by CUDAQuickSurf::calc_surf, and CUDAQuickSurf::get_chunk_bufs.

#define GBLOCKSZY   8
 

Definition at line 813 of file CUDAQuickSurf.cu.

Referenced by CUDAQuickSurf::calc_surf, and CUDAQuickSurf::get_chunk_bufs.

#define GBLOCKSZZ   2
 

Definition at line 818 of file CUDAQuickSurf.cu.

Referenced by CUDAQuickSurf::calc_surf, and CUDAQuickSurf::get_chunk_bufs.

#define GGRIDSZ   8.0f
 

Definition at line 811 of file CUDAQuickSurf.cu.

#define GPU_X_ALIGNMASK   (TILESIZEX - 1)
 

Definition at line 371 of file CUDAQuickSurf.cu.

Referenced by cudadensitythread, and vmd_cuda_gaussdensity_direct.

#define GPU_Y_ALIGNMASK   (TILESIZEY - 1)
 

Definition at line 372 of file CUDAQuickSurf.cu.

Referenced by cudadensitythread, and vmd_cuda_gaussdensity_direct.

#define GRID_CELL_EMPTY   0xffffffff
 

Definition at line 642 of file CUDAQuickSurf.cu.

Referenced by gaussdensity_fast, gaussdensity_fast_tex, and vmd_cuda_build_density_atom_grid.

#define GTEXBLOCKSZZ   2
 

Definition at line 816 of file CUDAQuickSurf.cu.

Referenced by CUDAQuickSurf::calc_surf, and CUDAQuickSurf::get_chunk_bufs.

#define GTEXUNROLL   4
 

Definition at line 817 of file CUDAQuickSurf.cu.

Referenced by CUDAQuickSurf::calc_surf, gaussdensity_fast_tex, and CUDAQuickSurf::get_chunk_bufs.

#define GUNROLL   4
 

Definition at line 819 of file CUDAQuickSurf.cu.

Referenced by CUDAQuickSurf::calc_surf, gaussdensity_fast, and CUDAQuickSurf::get_chunk_bufs.

#define TILESIZEX   DBLOCKSZX*DUNROLLX
 

Definition at line 369 of file CUDAQuickSurf.cu.

#define TILESIZEY   DBLOCKSZY
 

Definition at line 370 of file CUDAQuickSurf.cu.


Function Documentation

void * cudadensitythread void *    [static]
 

Definition at line 444 of file CUDAQuickSurf.cu.

References enthrparms::colors, CUERR, DBLOCKSZX, DBLOCKSZY, DUNROLLX, wkf_tasktile_struct::end, GPU_X_ALIGNMASK, GPU_Y_ALIGNMASK, enthrparms::gridspacing, enthrparms::isovalue, enthrparms::natoms, NULL, enthrparms::numcol, enthrparms::numplane, enthrparms::numpt, wkf_tasktile_struct::start, enthrparms::volmap, enthrparms::voltexmap, wkf_msg_timer_create, wkf_msg_timer_destroy, wkf_msg_timer_timeout, WKF_SCHED_DONE, wkf_threadlaunch_getdata, wkf_threadlaunch_getid, wkf_threadlaunch_next_tile, wkf_timer_create, wkf_timer_destroy, wkf_timer_start, wkf_timer_timenow, wkf_timerhandle, and enthrparms::xyzr.

Referenced by vmd_cuda_gaussdensity_direct.

__global__ void gaussdensity_direct int    natoms,
const float4 *    xyzr,
float    gridspacing,
unsigned int    z,
float *    densitygrid
[static]
 

Definition at line 278 of file CUDAQuickSurf.cu.

References DBLOCKSZX, and DUNROLLX.

__global__ void gaussdensity_direct_tex int    natoms,
const float4 *    xyzr,
const float4 *    colors,
float    gridspacing,
unsigned int    z,
float *    densitygrid,
float3 *    voltexmap,
float    invisovalue
[static]
 

Definition at line 103 of file CUDAQuickSurf.cu.

References DBLOCKSZX, and DUNROLLX.

__global__ void gaussdensity_fast int    natoms,
const float4 *    sorted_xyzr,
int3    numvoxels,
int3    acncells,
float    acgridspacing,
float    invacgridspacing,
const uint2 *    cellStartEnd,
float    gridspacing,
unsigned int    z,
float *    densitygrid
[static]
 

Definition at line 973 of file CUDAQuickSurf.cu.

References GRID_CELL_EMPTY, and GUNROLL.

__global__ void gaussdensity_fast_tex int    natoms,
const float4 *    sorted_xyzr,
const float4 *    sorted_color,
int3    numvoxels,
int3    acncells,
float    acgridspacing,
float    invacgridspacing,
const uint2 *    cellStartEnd,
float    gridspacing,
unsigned int    z,
float *    densitygrid,
float3 *    voltexmap,
float    invisovalue
[static]
 

Definition at line 827 of file CUDAQuickSurf.cu.

References GRID_CELL_EMPTY, and GTEXUNROLL.

__global__ void hashAtoms unsigned int    natoms,
const float4 *    xyzr,
int3    numvoxels,
float    invgridspacing,
unsigned int *    atomIndex,
unsigned int *    atomHash
[static]
 

Definition at line 645 of file CUDAQuickSurf.cu.

__global__ void sortAtomsGenCellLists unsigned int    natoms,
const float4 *    xyzr_d,
const float4 *    color_d,
const unsigned int *    atomIndex_d,
const unsigned int *    atomHash_d,
float4 *    sorted_xyzr_d,
float4 *    sorted_color_d,
uint2 *    cellStartEnd_d
[static]
 

Definition at line 675 of file CUDAQuickSurf.cu.

References NULL.

int vmd_cuda_build_density_atom_grid int    natoms,
const float4 *    xyzr_d,
const float4 *    color_d,
float4 *    sorted_xyzr_d,
float4 *    sorted_color_d,
unsigned int *    atomIndex_d,
unsigned int *    atomHash_d,
uint2 *    cellStartEnd_d,
int3    volsz,
float    invgridspacing
[static]
 

Definition at line 726 of file CUDAQuickSurf.cu.

References GRID_CELL_EMPTY.

Referenced by CUDAQuickSurf::calc_surf.

int vmd_cuda_gaussdensity_direct long int    natoms,
float4 *    xyzr,
float4 *    colors,
float *    volmap,
float *    voltexmap,
int3    volsz,
float    radscale,
float    gridspacing,
float    isovalue,
float    gausslim
 

Definition at line 374 of file CUDAQuickSurf.cu.

References enthrparms::colors, cudadensitythread, wkf_tasktile_struct::end, FLOPSPERATOMEVAL, FLOPSPERATOMEVALTEX, GPU_X_ALIGNMASK, GPU_Y_ALIGNMASK, enthrparms::gridspacing, enthrparms::isovalue, enthrparms::natoms, NULL, enthrparms::numcol, enthrparms::numplane, enthrparms::numpt, enthrparms::radscale, wkf_tasktile_struct::start, vmd_cuda_num_devices, enthrparms::volmap, enthrparms::voltexmap, wkf_thread_numprocessors, wkf_threadlaunch, wkf_timer_create, wkf_timer_destroy, wkf_timer_start, wkf_timer_stop, wkf_timer_time, wkf_timerhandle, and enthrparms::xyzr.


Generated on Sat May 26 01:48:44 2012 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002