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: OpenCLUtils.h,v $ 00013 * $Author: johns $ $Locker: $ $State: Exp $ 00014 * $Revision: 1.4 $ $Date: 2019/01/17 21:38:55 $ 00015 * 00016 *************************************************************************** 00017 * DESCRIPTION: 00018 * OpenCL utility functions for use in VMD 00019 * 00020 ***************************************************************************/ 00021 00022 #if defined(__APPLE__) 00023 #include <OpenCL/cl.h> 00024 #else 00025 #include <CL/cl.h> 00026 #endif 00027 00028 int vmd_cl_print_platform_info(void); 00029 00030 cl_platform_id vmd_cl_get_platform_index(int i); 00031 00032 int vmd_cl_context_num_devices(cl_context clctx); 00033 00034 cl_command_queue vmd_cl_create_command_queue(cl_context clctx, int dev); 00035 00036 cl_kernel vmd_cl_compile_kernel(cl_context clctx, const char *kernname, 00037 const char *srctext, const char *flags, 00038 cl_int *clerr, int verbose); 00039 00040