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

OpenCLVolCPotential.C File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <CL/cl.h>
#include "Inform.h"
#include "utilities.h"
#include "WKFThreads.h"
#include "WKFUtils.h"
#include "OpenCLKernels.h"
#include "OpenCLUtils.h"

Go to the source code of this file.

Compounds

struct  enthrparms

Defines

#define CLERR
#define MAXATOMS   4000
#define UNROLLX   8
#define UNROLLY   1
#define BLOCKSIZEX   8
#define BLOCKSIZEY   8
#define BLOCKSIZE   (BLOCKSIZEX * BLOCKSIZEY)
#define V4UNROLLX   8
#define V4UNROLLY   1
#define V4BLOCKSIZEX   8
#define V4BLOCKSIZEY   8
#define V4BLOCKSIZE   V4BLOCKSIZEX * V4BLOCKSIZEY
#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 V4TILESIZEX   V4BLOCKSIZEX*V4UNROLLX
#define V4TILESIZEY   V4BLOCKSIZEY*V4UNROLLY
#define V4GPU_X_ALIGNMASK   (V4TILESIZEX - 1)
#define V4GPU_Y_ALIGNMASK   (V4TILESIZEY - 1)
#define DMABUFPADSIZE   (32 * 1024)

Functions

void * openclenergythread (void *)
int copyatomstoconstbuf (cl_command_queue clcmdq, cl_mem datominfo, const float *atoms, int count, float zplane)
int vmd_opencl_vol_cpotential (long int natoms, float *atoms, float *grideners, long int numplane, long int numcol, long int numpt, float gridspacing)
cl_program vmd_opencl_compile_volcpotential_pgm (cl_context clctx, cl_device_id *cldevs, int &clerr)

Variables

const char * clenergysrc


Define Documentation

#define BLOCKSIZE   (BLOCKSIZEX * BLOCKSIZEY)
 

Definition at line 94 of file OpenCLVolCPotential.C.

Referenced by vmd_opencl_compile_volcpotential_pgm.

#define BLOCKSIZEX   8
 

Definition at line 92 of file OpenCLVolCPotential.C.

Referenced by openclenergythread, and vmd_opencl_compile_volcpotential_pgm.

#define BLOCKSIZEY   8
 

Definition at line 93 of file OpenCLVolCPotential.C.

Referenced by openclenergythread, and vmd_opencl_compile_volcpotential_pgm.

#define CLERR
 

Value:

if (clerr != CL_SUCCESS) {                     \
    printf("opencl error %d, %s line %d\n", clerr, __FILE__, __LINE__); \
    return NULL;                                   \
  }

Definition at line 51 of file OpenCLVolCPotential.C.

Referenced by openclenergythread, and vmd_opencl_compile_volcpotential_pgm.

#define DMABUFPADSIZE   (32 * 1024)
 

#define FLOPSPERATOMEVAL   (59.0/8.0)
 

Definition at line 103 of file OpenCLVolCPotential.C.

Referenced by vmd_opencl_vol_cpotential.

#define GPU_X_ALIGNMASK   (TILESIZEX - 1)
 

Definition at line 227 of file OpenCLVolCPotential.C.

Referenced by openclenergythread, and vmd_opencl_vol_cpotential.

#define GPU_Y_ALIGNMASK   (TILESIZEY - 1)
 

Definition at line 228 of file OpenCLVolCPotential.C.

Referenced by openclenergythread, and vmd_opencl_vol_cpotential.

#define MAXATOMS   4000
 

Definition at line 64 of file OpenCLVolCPotential.C.

Referenced by copyatomstoconstbuf, and openclenergythread.

#define TILESIZEX   BLOCKSIZEX*UNROLLX
 

Definition at line 225 of file OpenCLVolCPotential.C.

#define TILESIZEY   BLOCKSIZEY*UNROLLY
 

Definition at line 226 of file OpenCLVolCPotential.C.

#define UNROLLX   8
 

Definition at line 90 of file OpenCLVolCPotential.C.

Referenced by openclenergythread, and vmd_opencl_compile_volcpotential_pgm.

#define UNROLLY   1
 

Definition at line 91 of file OpenCLVolCPotential.C.

Referenced by openclenergythread, and vmd_opencl_compile_volcpotential_pgm.

#define V4BLOCKSIZE   V4BLOCKSIZEX * V4BLOCKSIZEY
 

Definition at line 100 of file OpenCLVolCPotential.C.

Referenced by vmd_opencl_compile_volcpotential_pgm.

#define V4BLOCKSIZEX   8
 

Definition at line 98 of file OpenCLVolCPotential.C.

Referenced by openclenergythread, and vmd_opencl_compile_volcpotential_pgm.

#define V4BLOCKSIZEY   8
 

Definition at line 99 of file OpenCLVolCPotential.C.

Referenced by openclenergythread, and vmd_opencl_compile_volcpotential_pgm.

#define V4GPU_X_ALIGNMASK   (V4TILESIZEX - 1)
 

Definition at line 232 of file OpenCLVolCPotential.C.

Referenced by openclenergythread, and vmd_opencl_vol_cpotential.

#define V4GPU_Y_ALIGNMASK   (V4TILESIZEY - 1)
 

Definition at line 233 of file OpenCLVolCPotential.C.

Referenced by openclenergythread, and vmd_opencl_vol_cpotential.

#define V4TILESIZEX   V4BLOCKSIZEX*V4UNROLLX
 

Definition at line 230 of file OpenCLVolCPotential.C.

#define V4TILESIZEY   V4BLOCKSIZEY*V4UNROLLY
 

Definition at line 231 of file OpenCLVolCPotential.C.

#define V4UNROLLX   8
 

Definition at line 96 of file OpenCLVolCPotential.C.

Referenced by openclenergythread, and vmd_opencl_compile_volcpotential_pgm.

#define V4UNROLLY   1
 

Definition at line 97 of file OpenCLVolCPotential.C.

Referenced by openclenergythread, and vmd_opencl_compile_volcpotential_pgm.


Function Documentation

int copyatomstoconstbuf cl_command_queue    clcmdq,
cl_mem    datominfo,
const float *    atoms,
int    count,
float    zplane
[static]
 

Definition at line 235 of file OpenCLVolCPotential.C.

References atoms, MAXATOMS, and NULL.

Referenced by cudaenergythread, and openclenergythread.

void * openclenergythread void *    [static]
 

Definition at line 361 of file OpenCLVolCPotential.C.

References enthrparms::atoms, atoms, BLOCKSIZEX, BLOCKSIZEY, CLERR, copyatomstoconstbuf, wkf_tasktile_struct::end, GPU_X_ALIGNMASK, GPU_Y_ALIGNMASK, enthrparms::grideners, enthrparms::gridspacing, gridspacing, MAXATOMS, enthrparms::natoms, NULL, enthrparms::numcol, enthrparms::numplane, enthrparms::numpt, wkf_tasktile_struct::start, UNROLLX, UNROLLY, V4BLOCKSIZEX, V4BLOCKSIZEY, V4GPU_X_ALIGNMASK, V4GPU_Y_ALIGNMASK, V4UNROLLX, V4UNROLLY, vmd_cl_get_platform_index, vmd_opencl_compile_volcpotential_pgm, 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, and wkf_timerhandle.

Referenced by vmd_opencl_vol_cpotential.

cl_program vmd_opencl_compile_volcpotential_pgm cl_context    clctx,
cl_device_id *    cldevs,
int &    clerr
 

Definition at line 327 of file OpenCLVolCPotential.C.

References BLOCKSIZE, BLOCKSIZEX, BLOCKSIZEY, clenergysrc, CLERR, NULL, UNROLLX, UNROLLY, V4BLOCKSIZE, V4BLOCKSIZEX, V4BLOCKSIZEY, V4UNROLLX, and V4UNROLLY.

Referenced by openclenergythread.

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

Definition at line 260 of file OpenCLVolCPotential.C.

References enthrparms::atoms, atoms, wkf_tasktile_struct::end, FLOPSPERATOMEVAL, GPU_X_ALIGNMASK, GPU_Y_ALIGNMASK, enthrparms::grideners, enthrparms::gridspacing, gridspacing, enthrparms::natoms, NULL, enthrparms::numcol, enthrparms::numplane, enthrparms::numpt, openclenergythread, wkf_tasktile_struct::start, V4GPU_X_ALIGNMASK, V4GPU_Y_ALIGNMASK, wkf_threadlaunch, wkf_timer_create, wkf_timer_destroy, wkf_timer_start, wkf_timer_stop, wkf_timer_time, and wkf_timerhandle.

Referenced by vol_cpotential.


Variable Documentation

const char* clenergysrc
 

Definition at line 106 of file OpenCLVolCPotential.C.

Referenced by vmd_opencl_compile_volcpotential_pgm.


Generated on Fri Nov 8 02:46:05 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002