Add ComparatorApiManager with SmoCallbacks hooks and startup load.

Register comparator types via a dedicated manager and expose lookup/create
hooks through SmoCallbacks so stimbuff libs can resolve comparators at load time.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-10 21:16:05 -04:00
parent 7eda755c15
commit ab930a2df3
7 changed files with 358 additions and 1 deletions
+11
View File
@@ -8,6 +8,7 @@
#include <memory>
#include <vector>
#include <preprocessor.h>
#include <user/comparatorApiDesc.h>
#include <user/deviceAttachmentSpec.h>
#include <spinscale/co/dynamicPostingInvoker.h>
#include <spinscale/co/invokers.h>
@@ -137,8 +138,18 @@ struct SmoCallbacks
*/
void (*ComputeManager_releaseDevice)(
std::shared_ptr<smo::compute::ComputeDevice> device);
std::shared_ptr<cologex::ExportedComparatorTypeDesc>
(*ComparatorManager_getComparatorType)(
cologex::ComparatorTypeId typeId);
std::unique_ptr<cologex::Comparator> (*Comparator_getNewInstance)(
const std::shared_ptr<cologex::ExportedComparatorTypeDesc>&
comparatorType);
};
const SmoCallbacks& getSmoCallbacks();
struct Sal_Mgmt_LibOps
{
/* When Salmanoff loads a stim buff API lib, it calls this function to initialize