130f4f45fSnbeams // Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC. 230f4f45fSnbeams // Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707. 330f4f45fSnbeams // All Rights reserved. See files LICENSE and NOTICE for details. 430f4f45fSnbeams // 530f4f45fSnbeams // This file is part of CEED, a collection of benchmarks, miniapps, software 630f4f45fSnbeams // libraries and APIs for efficient high-order finite element and spectral 730f4f45fSnbeams // element discretizations for exascale applications. For more information and 830f4f45fSnbeams // source code availability see http://github.com/ceed. 930f4f45fSnbeams // 1030f4f45fSnbeams // The CEED research is supported by the Exascale Computing Project 17-SC-20-SC, 1130f4f45fSnbeams // a collaborative effort of two U.S. Department of Energy organizations (Office 1230f4f45fSnbeams // of Science and the National Nuclear Security Administration) responsible for 1330f4f45fSnbeams // the planning and preparation of a capable exascale ecosystem, including 1430f4f45fSnbeams // software, applications, hardware, advanced system engineering and early 1530f4f45fSnbeams // testbed platforms, in support of the nation's exascale computing imperative. 1630f4f45fSnbeams #ifndef _ceed_hip_compile_h 1730f4f45fSnbeams #define _ceed_hip_compile_h 1830f4f45fSnbeams 1930f4f45fSnbeams #include <ceed.h> 2030f4f45fSnbeams 2130f4f45fSnbeams #include <hip/hip_runtime.h> 2230f4f45fSnbeams 23*cf7477b8Snbeams CEED_INTERN int CeedCompileHip(Ceed ceed, const char *source, 24*cf7477b8Snbeams hipModule_t *module, 2530f4f45fSnbeams const CeedInt numopts, ...); 2630f4f45fSnbeams 27*cf7477b8Snbeams CEED_INTERN int CeedGetKernelHip(Ceed ceed, hipModule_t module, 28*cf7477b8Snbeams const char *name, 2930f4f45fSnbeams hipFunction_t *kernel); 3030f4f45fSnbeams 3130f4f45fSnbeams CEED_INTERN int CeedRunKernelHip(Ceed ceed, hipFunction_t kernel, 3230f4f45fSnbeams const int gridSize, 3330f4f45fSnbeams const int blockSize, void **args); 3430f4f45fSnbeams 3530f4f45fSnbeams CEED_INTERN int CeedRunKernelDimHip(Ceed ceed, hipFunction_t kernel, 3630f4f45fSnbeams const int gridSize, 3730f4f45fSnbeams const int blockSizeX, const int blockSizeY, 3830f4f45fSnbeams const int blockSizeZ, void **args); 3930f4f45fSnbeams 4030f4f45fSnbeams CEED_INTERN int CeedRunKernelDimSharedHip(Ceed ceed, hipFunction_t kernel, 4130f4f45fSnbeams const int gridSize, const int blockSizeX, 4230f4f45fSnbeams const int blockSizeY, const int blockSizeZ, 4330f4f45fSnbeams const int sharedMemSize, void **args); 4430f4f45fSnbeams 4530f4f45fSnbeams #endif 46