00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef OPENCLKERNELS_H
00021 #define OPENCLKERNELS_H
00022
00023 #if defined(__APPLE__)
00024 #include <OpenCL/cl.h>
00025 #else
00026 #include <CL/cl.h>
00027 #endif
00028
00029 #include "WKFThreads.h"
00030
00031 int vmd_opencl_vol_cpotential(long int natoms, float* atoms, float* grideners,
00032 long int numplane, long int numcol, long int numpt,
00033 float gridspacing);
00034
00035 typedef struct {
00036 cl_context ctx;
00037 cl_command_queue cmdq;
00038 cl_device_id *devs;
00039 cl_program pgm;
00040 cl_kernel kconstmem;
00041 cl_kernel kconstmem_vec4;
00042 cl_kernel ktiledshared;
00043 } vmd_opencl_orbital_handle;
00044
00045
00046
00047
00048 vmd_opencl_orbital_handle * vmd_opencl_create_orbital_handle(cl_context ctx, cl_command_queue cmdq, cl_device_id *devs);
00049
00050 int vmd_opencl_destroy_orbital_handle(vmd_opencl_orbital_handle * orbh);
00051
00052 int vmd_opencl_evaluate_orbital_grid(wkf_threadpool_t *devpool,
00053 vmd_opencl_orbital_handle *orbh,
00054 int numatoms,
00055 const float *wave_f, int num_wave_f,
00056 const float *basis_array, int num_basis,
00057 const float *atompos,
00058 const int *atom_basis,
00059 const int *num_shells_per_atom,
00060 const int *num_prim_per_shell,
00061 const int *shell_types,
00062 int num_shells,
00063 const int *numvoxels,
00064 float voxelsize,
00065 const float *origin,
00066 int density,
00067 float *orbitalgrid);
00068
00069 #endif
00070