Skip to content

Commit

Permalink
Add CL_PLATFORM_UNLOADABLE_KHR and layers deinitialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerilk committed Sep 5, 2024
1 parent cbf115c commit 9e99cc3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions CL/cl_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@ clLogMessagesToStderrAPPLE(

/* cl_platform_info */
#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920
#define CL_PLATFORM_UNLOADABLE_KHR 0x0921

/* Error codes */
#define CL_PLATFORM_NOT_FOUND_KHR -1001
Expand Down
17 changes: 16 additions & 1 deletion CL/cl_layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extern "C" {
"cl_loader_layers"


#define CL_LOADER_LAYERS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
#define CL_LOADER_LAYERS_EXTENSION_VERSION CL_MAKE_VERSION(2, 0, 0)

typedef cl_uint cl_layer_info;
typedef cl_uint cl_layer_api_version;
Expand All @@ -65,6 +65,7 @@ typedef cl_uint cl_layer_api_version;

/* Misc API enums */
#define CL_LAYER_API_VERSION_100 100
#define CL_LAYER_API_VERSION_200 200


typedef cl_int CL_API_CALL
Expand All @@ -87,6 +88,13 @@ clInitLayer_t(
typedef clInitLayer_t *
clInitLayer_fn ;

typedef cl_int CL_API_CALL
clDeinitLayer_t(
void );

typedef clDeinitLayer_t *
clDeinitLayer_fn ;

/*
** The function pointer typedefs prefixed with "pfn_" are provided for
** compatibility with earlier versions of the headers. New code is
Expand All @@ -100,6 +108,9 @@ pfn_clGetLayerInfo ;
typedef clInitLayer_t *
pfn_clInitLayer ;

typedef clDeinitLayer_t *
pfn_clDeinitLayer ;

#if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)

extern CL_API_ENTRY cl_int CL_API_CALL
Expand All @@ -116,6 +127,10 @@ clInitLayer(
cl_uint* num_entries_ret,
const cl_icd_dispatch** layer_dispatch_ret) ;

extern CL_API_ENTRY cl_int CL_API_CALL
clDeinitLayer(
void ) ;

#endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */

#ifdef __cplusplus
Expand Down

0 comments on commit 9e99cc3

Please sign in to comment.