mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-07-03 01:46:12 +02:00
Add qmckl_extra pointer
This commit is contained in:
parent
ea11fd3b15
commit
84217bd3c1
|
@ -141,9 +141,19 @@ typedef struct qmckl_context_struct {
|
||||||
/* To be implemented:
|
/* To be implemented:
|
||||||
,*/
|
,*/
|
||||||
|
|
||||||
|
/* Pointer to implementation-specific data */
|
||||||
|
|
||||||
|
void* qmckl_extra;
|
||||||
|
|
||||||
} qmckl_context_struct;
|
} qmckl_context_struct;
|
||||||
#+end_src
|
#+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
|
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
|
by a pointer is a valid context. This allows to check that even if
|
||||||
the pointer associated with a context is non-null, we can still
|
the pointer associated with a context is non-null, we can still
|
||||||
|
|
Loading…
Reference in New Issue
Block a user