Commit Graph

206 Commits

Author SHA1 Message Date
hayodea 27b43c6686 Add ComputeManager; add SmoHooks for getting ClDevices, buffers
We added a new centralized OpenCL Compute manager. This can later
be extended to support CUDA, SyCL, etc. SMO can be configured at
build time to choose which API it will use for compute.

Moreover, the ComputeMgr allows us to register buffers which are
available to all cl_contexts.
2025-11-19 22:34:25 -04:00
hayodea b598ca8594 libs: Add smohook for getting cmdline opts 2025-11-07 14:59:28 -04:00
hayodea 457d0f9345 Dbg:Add CallableTracer for callables post()ed to boost.asio
This class and its macro allow us to trace the invocation of
callbacks as they're invoked by Boost.asio.
2025-11-06 21:45:16 -04:00
hayodea eeb057effd Dbg:Threading: prefix thread names with "smo:" so they group 2025-11-06 15:09:15 -04:00
hayodea c7e117b08e Dbg:Threading: use pthread_setname_np for debugging ease 2025-11-06 15:04:04 -04:00
hayodea af57c4dfd1 Boost: move top_ link fixer to top of files 2025-11-06 15:03:26 -04:00
hayodea 032e9ef8d5 DevMgt: Update comments on bg daemon thread selection 2025-11-04 00:33:43 -04:00
hayodea d6e1e7ebc0 DevMgmt: StimBuffApi bg tasks should execute on body thread 2025-11-04 00:32:14 -04:00
hayodea 5845f1a41d Bug:Boost: Use shlibs instead of header-only for call_stack::top_
This symbol is defined as a static member object inside of a
boost detail header. When boost headers are used in a project
that uses Boost in both the main binary as well as dlopen()'d
shlibs, the top_ symbol gets duplicated and the metadata gets
partitioned.

We use the Boost shlib to unify both the main binary and the
shlibs to use the same memory address for top_.

This involves marking the templated object call_stack::top_ as
"extern" and then declaring to Boost that we intend to use the
shlibs.
2025-11-03 22:59:52 -04:00
hayodea 67af9f02da DAPSpecs: Update parseRequiredParamAsInt to support all param lists 2025-11-01 01:11:34 -04:00
hayodea e824685c19 DAPSpec: Add params to quale-iface-api
We add params to the quale iface (soon to be renamed to cologex-api).
This allows us to eventually set the history length for stimbuffs.
2025-11-01 00:57:04 -04:00
hayodea 07c48d78d1 Todo: update comments 2025-10-31 08:57:37 -04:00
hayodea 393326052c Todo: update and add comments to finalizeInd 2025-10-31 08:57:37 -04:00
hayodea a68143810e DeviceReattacher: use provided ioThread; not mrntt directly 2025-10-31 08:57:22 -04:00
hayodea 109cd9eb03 DevReattacher: Add 20ms sync delay during stop()
This fixes the bug where in-flight async ops that were triggered
by DevReattacher (such as livoxGen1_attachDeviceReq) that have
unconditional delays in them would fire late, after the state
var they rely upon had already been de-initialized.

We use an async bridge to ensure that those ops get executed in
the background and then resume execution after the delay.
2025-10-31 08:20:33 -04:00
hayodea b277baa76d Whitespace 2025-10-23 00:24:57 -04:00
hayodea 66a9db13c3 LivoxProto1: invoke enablePcloudDataReq
Sadly we don't get to immediately see the results of our
work because we have to do a unified dispatcher for the incoming
UDP messages on the command channel.
2025-10-22 01:59:04 -04:00
hayodea e444cd1e04 Move files around for cologex and sitbuff lib impl 2025-10-21 20:02:36 -04:00
hayodea 6bc5bd30d5 Rename: ChronoFrame=>PhenoFrame and ChronoSeq=>PhenoSeq 2025-10-21 19:38:49 -04:00
hayodea 56367402d7 Move intrinEventInd()s from MarionetteComponent=>Director 2025-10-21 19:38:49 -04:00
hayodea 035accf553 Rename: painfulQuale.cpp=>negtrinEvent.cpp 2025-10-21 19:38:49 -04:00
hayodea 55f21c5436 Add skeleton negtrinEventInd, build painfulQuale.cpp again 2025-10-21 19:38:49 -04:00
hayodea d1b99852a8 Move MarionetteComponent out of component.h=>marionette.h 2025-10-21 19:38:49 -04:00
hayodea 66bb30cef5 Move painfulQuale.cpp into marionette 2025-10-21 19:38:49 -04:00
hayodea 068a885bff Goal: now is a MentalEntity 2025-10-21 19:38:49 -04:00
latentprion d317f1fb06 Whitespace 2025-10-16 03:41:22 -04:00
latentprion edd223b083 Remove unnecessary componentThread.h #includes
Since componentThread #includes boost::asio components, removing
it should improve compile times.
2025-10-16 02:15:16 -04:00
latentprion 945c5b397b Build: remove superfluous io_service.hpp #includes 2025-10-16 01:08:05 -04:00
latentprion 5017bf5f92 Build: use piecemeal boost headers.
Reduces compile time on a 4-core ARM Rpi5 from 1m12s wallclock
(i.e: "real") time to 0m55s; and from 4m+ "user" time to 3m8s.
2025-10-16 01:00:48 -04:00
hayodea 95d5c46e43 Rename: CologexSet=>CologexSeq to be consistent with chronomena 2025-10-05 21:44:12 -04:00
hayodea 4a55ff9bf2 Revamp Chronomenon: ChronoFrame and ChronoSeq are new classes
Chronomenon is now the base class category for stored raw
stim data.
2025-10-05 21:44:12 -04:00
hayodea 27ff4a3a0a Concept,Cologex,Goal: refactor headers
All Cologexes (both Cologexes and CologexSets) are now categorized
as Concepts.
Goals are now also Concepts -- they inherit from Concept as a base
class.

Using Concept as the base class for both Cologex and CologexSet
allows us to treat both cologexes and cologexsets the same way
when comparing in the abstract.
2025-10-05 21:44:12 -04:00
hayodea eddee05e41 Delete: qualeBundle.h 2025-10-05 21:44:12 -04:00
hayodea ccc7fd8e04 Rename: Concept=>Cologex 2025-10-05 21:43:46 -04:00
hayodea 3a50be05f8 Qutex: nRequiredLocks==1 at front should never call backoff 2025-10-04 14:52:02 -04:00
hayodea eb5875fe0d Rename: Sense API => Stim Buff API 2025-10-01 20:03:47 -04:00
hayodea 56b8e83a09 Update senseApiDesc.h and opts.cpp for clarity in device attachment and usage examples 2025-10-01 18:20:59 -04:00
hayodea a66d91fa31 DevAttachment:Rename: api=>stimbuffapi, implexor=>qualeiface 2025-10-01 18:10:58 -04:00
hayodea e9e273c012 CMake: PRefix config opt with CONFIG_ 2025-10-01 11:02:28 -04:00
hayodea 942f9d8515 DevMgr: formatting 2025-10-01 10:21:32 -04:00
hayodea 1e22656299 DevMgr: Call uniq_ptr.release on DeviceReattacher 2025-10-01 10:19:08 -04:00
hayodea 55fe2675df DevMgr: Use releaseQutexEarly 2025-09-30 22:53:17 -04:00
hayodea af19125ac2 Qutex: Add check for double-release() 2025-09-30 22:53:01 -04:00
hayodea 7ddbde1a2f DevMgr:removeDASpec: Make serialized; acquire DevMgr qutex 2025-09-30 22:10:39 -04:00
hayodea ac3d97b3ec DevMgr:newDASpecInd: now lockvoked, acquires DevMgr qutex
We now acquire the DevMgr qutex when doing the newDASpecInd async
op. The qutex is held across an async sequence with potentially
a real hardware blocking bottleneck.
2025-09-30 22:01:34 -04:00
hayodea 274143e41d Formatting 2025-09-30 21:40:26 -04:00
hayodea d75430ef82 Qutex: Document the need to deal with early release()s 2025-09-30 21:25:58 -04:00
hayodea 06f3f2eebe DevMgr:attachAllUnattachedDevicesFromKnownListReq: acquire qutex
We should acquire the qutex here before iterating through the list
of DA specs.
2025-09-30 21:24:51 -04:00
hayodea 07609c6d6c SenseApiLib:Add isBeingDestroyed atomic flag for getter bailout
Since we have no choice but to access the sh_ptr<SenseApiLib> for
a lib before we can get its Qutex, we use this flag to ensure that
we can know whether the SenseApiLib data structure and its Qutex
are still valid when we enter -- i.e, we ensure that the SenseApiLib
object wasn't destroyed under our feet.
2025-09-30 21:01:00 -04:00
hayodea 1bad358921 DevMgr:at/detachSenseDevReq: release SenseApiMgr Qutex early
Release it early when we no longer need it.
2025-09-30 20:29:39 -04:00