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

OpenCLKernels.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr
00003  *cr            (C) Copyright 1995-2019 The Board of Trustees of the
00004  *cr                        University of Illinois
00005  *cr                         All Rights Reserved
00006  *cr
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: OpenCLKernels.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.8 $        $Date: 2019/01/17 21:21:00 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *   Wrapper for OpenCL kernels
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;        // cached
00037   cl_command_queue cmdq; // cached
00038   cl_device_id *devs;    // cached
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 // Molecular orbital calculation routines
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 

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