diff options
| author | hiddenalpha.ch | 2026-08-11 00:26:40 +0200 |
|---|---|---|
| committer | hiddenalpha.ch | 2026-08-11 00:26:40 +0200 |
| commit | 48b4de2b313f19acb895f3fe6e8de09d77060a5f (patch) | |
| tree | c5182eecf556c00365ababd7bead3b8ff1031202 | |
| parent | 8c643e9b7df0a269fd3cd7c2c0be22d5c5a13498 (diff) | |
| download | Qntan-48b4de2b313f19acb895f3fe6e8de09d77060a5f.tar.gz Qntan-48b4de2b313f19acb895f3fe6e8de09d77060a5f.zip | |
Profiler guided optimizations. Plus add doc T0D0s.
| -rw-r--r-- | include/qntan/Qntan.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/qntan/Qntan.h b/include/qntan/Qntan.h index 1dcb005..db84e83 100644 --- a/include/qntan/Qntan.h +++ b/include/qntan/Qntan.h @@ -319,7 +319,11 @@ struct Qntan_Scheduler { # define Qntan_Logger_isDebugOn(A) ((A) && (*(A))->isDebugOn(A)) #endif #ifndef Qntan_Logger_isTraceOn -# define Qntan_Logger_isTraceOn(A) ((A) && (*(A))->isTraceOn(A)) +# if !NDEBUG +# define Qntan_Logger_isTraceOn(A) ((A) && (*(A))->isTraceOn(A)) +# else +# define Qntan_Logger_isTraceOn(A) 0 +# endif #endif struct Qntan_Logger { @@ -827,6 +831,11 @@ struct Qntan_HshIdx { * consistency reasons, only ONE index can be used to decide if an * object already exists for exmaple. Allowing multiple would cause * conflicts as soon indexes disagree in such a case). + * + * WARN: This API is subject to change. Especially because it does + * not yet handle the case that a query potentially could return + * SEVERAL results. Just imagine a HshIdx of contacts, where several + * contacts could have the same name. */ size_t (*getCnt)( struct Qntan_HshIdx** ); /* Returns number of objects currently present in this collection. @@ -841,6 +850,10 @@ struct Qntan_HshIdx { /* Returns 0 if there's no object matching 'srch'. * Returns 1 if found object got copied to 'ptrToDst'. The element itelf * will swill be present in the table. + * + * TODO: As we support multi-dimmensional indexing, there is the + * possibility of `get()` to return SEVERAL items for certain other + * indexes. no? */ int (*swap)( struct Qntan_HshIdx**, void*elm, void*ptrToDst, int idx ); /* Returns 0 if 'elm' got copied into the hashtable. |
