From 84217bd3c1f6e22f6c49ec0105a95ab05a85bef4 Mon Sep 17 00:00:00 2001 From: Otto Kohulak Date: Thu, 24 Nov 2022 15:21:32 +0100 Subject: [PATCH] Add qmckl_extra pointer --- org/qmckl_context.org | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/org/qmckl_context.org b/org/qmckl_context.org index cb00776..3d39b8c 100644 --- a/org/qmckl_context.org +++ b/org/qmckl_context.org @@ -141,8 +141,18 @@ typedef struct qmckl_context_struct { /* To be implemented: ,*/ + /* Pointer to implementation-specific data */ + + void* qmckl_extra; + } qmckl_context_struct; #+end_src + + The qmckl_extra pointer lets the other implementation of the library + add specific things to the context. For example a GPU implementation + of QMCkl will need to store the device ID in the context, and this + can be made by creating a private data structure containing all + GPU-specific data, including the device ID. A tag is used internally to check if the memory domain pointed by a pointer is a valid context. This allows to check that even if