//------------------------------------------------------------------------------ // GraphBLAS/Config/GB_prejit.c: return list of PreJIT kernels //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2024, All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 //------------------------------------------------------------------------------ // This file is configured by cmake from Config/GB_prejit.c.in, which has // indexed the following @GB_PREJIT_LEN@ kernels in GraphBLAS/PreJIT: #include "GB.h" #include "GB_jit_kernel_proto.h" #include "GB_jitifyer.h" //------------------------------------------------------------------------------ // prototypes for all PreJIT kernels //------------------------------------------------------------------------------ @PREJIT_PROTO@ //------------------------------------------------------------------------------ // prototypes for all PreJIT query kernels //------------------------------------------------------------------------------ @PREJIT_QUERY@ //------------------------------------------------------------------------------ // GB_prejit_kernels: a list of function pointers to PreJIT kernels //------------------------------------------------------------------------------ #if ( @GB_PREJIT_LEN@ > 0 ) static void *GB_prejit_kernels [@GB_PREJIT_LEN@] = { @PREFUNCS@ } ; #endif //------------------------------------------------------------------------------ // GB_prejit_queries: a list of function pointers to PreJIT query kernels //------------------------------------------------------------------------------ #if ( @GB_PREJIT_LEN@ > 0 ) static void *GB_prejit_queries [@GB_PREJIT_LEN@] = { @PREQFUNCS@ } ; #endif //------------------------------------------------------------------------------ // GB_prejit_names: a list of names of PreJIT kernels //------------------------------------------------------------------------------ #if ( @GB_PREJIT_LEN@ > 0 ) static char *GB_prejit_names [@GB_PREJIT_LEN@] = { "@PRENAMES@" } ; #endif //------------------------------------------------------------------------------ // GB_prejit: return list of PreJIT function pointers and function names //------------------------------------------------------------------------------ void GB_prejit ( int32_t *nkernels, // return # of kernels void ***Kernel_handle, // return list of function pointers to kernels void ***Query_handle, // return list of function pointers to queries char ***Name_handle // return list of kernel names ) { (*nkernels) = @GB_PREJIT_LEN@ ; #if ( @GB_PREJIT_LEN@ == 0 ) (*Kernel_handle) = NULL ; (*Query_handle) = NULL ; (*Name_handle) = NULL ; #else (*Kernel_handle) = GB_prejit_kernels ; (*Query_handle) = GB_prejit_queries ; (*Name_handle) = GB_prejit_names ; #endif }