<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>C++ on jdcsen</title><link>https://jdcsen.com/tags/c++/</link><description>Recent content in C++ on jdcsen</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 01 Jan 1970 00:33:46 +0000</lastBuildDate><atom:link href="https://jdcsen.com/tags/c++/index.xml" rel="self" type="application/rss+xml"/><item><title>stable-diffusion.cpp: Identity Conditioning in sd-server</title><link>https://jdcsen.com/projects/sdcpp-identity-server/</link><pubDate>Thu, 01 Jan 1970 00:33:46 +0000</pubDate><guid>https://jdcsen.com/projects/sdcpp-identity-server/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;Fork of &lt;a href="https://github.com/leejet/stable-diffusion.cpp" target="_blank"&gt;stable-diffusion.cpp&lt;/a&gt; adding per-request reference-image identity conditioning (PhotoMaker v2 on SDXL bases, PuLID on Flux) to the &lt;code&gt;sd-server&lt;/code&gt; HTTP surface. Upstream registered the flags but only the CLI ever populated them.&lt;/li&gt;&#10;&lt;li&gt;Eleven commits, about 1,900 lines added over 19 files. Roughly 89% lives in &lt;code&gt;examples/server/&lt;/code&gt;; the core engine changes total 87 lines. &lt;code&gt;sd-cli&lt;/code&gt; and the core library stay Python-free.&lt;/li&gt;&#10;&lt;li&gt;Reference-image encoding runs in-process through an embedded CPython interpreter (pybind11), behind two CMake flags that default to OFF so the vanilla build is unchanged.&lt;/li&gt;&#10;&lt;li&gt;Identity embeddings can be extracted once and re-injected: the round trip reproduces the image-path generation byte for byte at a fixed seed.&lt;/li&gt;&#10;&lt;li&gt;&amp;ldquo;No identity images&amp;rdquo; is proven to mean &amp;ldquo;no effect&amp;rdquo;: generations are md5-identical to the bare base model.&lt;/li&gt;&#10;&lt;li&gt;One upstream-worthy bug fix in core: an off-by-one in &lt;code&gt;clip_preprocess&lt;/code&gt; center-cropping that crashed any CLIP-vision path on odd input dimensions.&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>gRPC Bidirectional Streaming for a C++ Node-Graph Framework</title><link>https://jdcsen.com/projects/grpc-pipe-wrapper/</link><pubDate>Thu, 01 Jan 1970 00:33:44 +0000</pubDate><guid>https://jdcsen.com/projects/grpc-pipe-wrapper/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;Nova Sonic needed the speech framework&amp;rsquo;s pipelines delivered as a containerized gRPC service: audio and system prompts streaming in, inference requests streaming out. The team&amp;rsquo;s code had only ever been called through JNI.&lt;/li&gt;&#10;&lt;li&gt;Mapped gRPC C++&amp;rsquo;s bidirectional-streaming reactor onto the framework&amp;rsquo;s pipe abstraction once, as a reusable layer covering session setup and teardown, signal handling, graceful error handling and logging.&lt;/li&gt;&#10;&lt;li&gt;A new service needs under 300 lines of integration code: which pipe input receives request messages, and which pipe outputs become response messages. Adopted org-wide as the standard way to deploy a pipeline.&lt;/li&gt;&#10;&lt;li&gt;Established Protobuf and gRPC generated code as first-class CMake libraries in the framework&amp;rsquo;s build, so the same generated types are consumed by the pipeline&amp;rsquo;s nodes and by the server without duplicate-symbol conflicts.&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Static Service Registry for a C++ Node-Graph Framework</title><link>https://jdcsen.com/projects/static-service-registry/</link><pubDate>Thu, 01 Jan 1970 00:33:43 +0000</pubDate><guid>https://jdcsen.com/projects/static-service-registry/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;Nodes in the C++ stream-processing framework behind Nova Sonic register themselves in a global registry through static initialization. No central list to edit, no explicit dependency from tools on the nodes they might load.&lt;/li&gt;&#10;&lt;li&gt;Registry is a thread-safe, function-local static constructed on first use, so registration is safe regardless of static initialization order across translation units.&lt;/li&gt;&#10;&lt;li&gt;Registration works by linking a node library or by &lt;code&gt;LD_PRELOAD&lt;/code&gt;ing it. The development CLI can assemble a graph from a JSON definition using nodes it was never compiled against.&lt;/li&gt;&#10;&lt;li&gt;Pulled double duty as a dependency-inversion mechanism: consumers depend on the node interface, not on implementing libraries. Adopted across the organization and later picked up for embedded speech processing.&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>One Build for Cloud and Device: Consolidating a 500k-Line C++ Engine</title><link>https://jdcsen.com/projects/build-system-consolidation/</link><pubDate>Thu, 01 Jan 1970 00:33:42 +0000</pubDate><guid>https://jdcsen.com/projects/build-system-consolidation/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;The legacy ASR engine, roughly 500k lines of C++, was built by its owners with GCC and plain CMake for the cloud. The on-device team consumed it as a library across about 7 ARM toolchains from the Android NDK plus 4 x86 gcc/clang variants, through a Conan-based build layer.&lt;/li&gt;&#10;&lt;li&gt;Before: on-device releases were hand-curated snapshots of the upstream engine, maintained in forks of every ASR package and re-merged periodically. Each release took days at minimum and often weeks, as toolchain-specific breakage surfaced and needed patches.&lt;/li&gt;&#10;&lt;li&gt;Fix: point all engine code at a single virtual build-system package. In the cloud dependency universe it resolves to bare CMake; in the device universe it resolves to the Conan layer, which drives the same CMake underneath. About 40 packages converted; one source tree builds for all 12 toolchains.&lt;/li&gt;&#10;&lt;li&gt;Kept it that way with a pre-merge analyzer that compiles every pull request against the device toolchains before it can land, so device compatibility is checked at merge time rather than discovered at release time.&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Safety-Critical Power Control for a Fielded RF Front End</title><link>https://jdcsen.com/projects/rf-power-control/</link><pubDate>Thu, 01 Jan 1970 00:33:39 +0000</pubDate><guid>https://jdcsen.com/projects/rf-power-control/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;A new L3Harris radio needed far more output dynamic range than the fielded RF front end it had to work with was designed to give.&lt;/li&gt;&#10;&lt;li&gt;The front end&amp;rsquo;s transmit chain had two gain stages: a coarse driver with three setpoints (low, medium, high) and a downstream fine stage adjustable in dB. The radio commanded a single power level. I designed and implemented the control software that turns that level into a safe setpoint pair for both stages.&lt;/li&gt;&#10;&lt;li&gt;Reaching the required range meant disabling the equipment&amp;rsquo;s built-in protection interlocks, so the software became the only thing standing between a command and hardware damage. Both stages maxed, or either past its limit, could destroy the amplifier and drop a pilot&amp;rsquo;s radio link.&lt;/li&gt;&#10;&lt;li&gt;Acted as de-facto software lead: direction for a small team, and project status reporting to organization management.&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Formula SAE Controls Team Lead</title><link>https://jdcsen.com/projects/controls-team-lead/</link><pubDate>Thu, 01 Jan 1970 00:33:38 +0000</pubDate><guid>https://jdcsen.com/projects/controls-team-lead/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;Led engineering teams to complete critical systems of a year-long engineering effort to develop an electric Formula race car.&lt;/li&gt;&#10;&lt;li&gt;Participated in and led design reviews for critical vehicle components.&lt;/li&gt;&#10;&lt;li&gt;Architected and implemented vehicle low-voltage systems, including safety circuits, vehicle networks, telemetry, and control.&lt;/li&gt;&#10;&lt;li&gt;Designed and built vehicle CCAs, working with EDA software (Eagle/KiCAD), from requirement collection to delivery.&lt;/li&gt;&#10;&lt;li&gt;Worked in close-knit, cross-functional teams to ensure effective and efficient concurrent development.&lt;/li&gt;&#10;&lt;/ul&gt;</description></item></channel></rss>