<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Raymond P. Burkholder - Things I Do - C++</title>
    <link>https://blog.raymond.burkholder.net/</link>
    <description>In And Around Technology and The Arts</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.7.2 - http://www.s9y.org/</generator>
    <pubDate>Sat, 11 Apr 2026 03:06:58 GMT</pubDate>

    <image>
        <url>https://blog.raymond.burkholder.net/templates/bulletproof/img/s9y_banner_small.png</url>
        <title>RSS: Raymond P. Burkholder - Things I Do - C++ - In And Around Technology and The Arts</title>
        <link>https://blog.raymond.burkholder.net/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>JUCE: Audio Framework</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1350-JUCE-Audio-Framework.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1350-JUCE-Audio-Framework.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1350</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1350</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Note to self: come back to this and redo some non-functional audio logic located in some code which needs to be uprooted and re-juiced.

&lt;p&gt;&lt;a href=&quot;https://juce.com/&quot; target=_blank&gt;JUCE&lt;/a&gt; - open source, cross-platform, software development framework provided as C++ source code, that can be used to create standalone software on Windows, macOS, Linux, iOS and Android, as well as VST, VST3, AU, AUv3, AAX and LV2 plug-ins. 
    </content:encoded>

    <pubDate>Sat, 11 Apr 2026 03:06:58 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1350-guid.html</guid>
    
</item>
<item>
    <title>Installing LibTorch with Cuda on NVIDIA GeForce RTX 4070</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1285-Installing-LibTorch-with-Cuda-on-NVIDIA-GeForce-RTX-4070.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1285-Installing-LibTorch-with-Cuda-on-NVIDIA-GeForce-RTX-4070.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1285</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1285</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;For trying out some LSTM Machine Learning algorithms with my &lt;a href=&quot;https://github.com/rburkholder/trade-frame&quot; target=_blank&gt;TradeFrame Algorithmic Trading Library&lt;/a&gt;, I wanted to install LibTorch with NVidia/Cuda support for hardware accelerating learning.

&lt;p&gt;Do not install the nvidia-driver yet.  It is part of the cuda deployment package.  Only install headers, which are necessary for building kernal modules.
&lt;blockquote&gt;&lt;pre&gt;
$ sudo apt install linux-headers-$(uname -r)
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;I used &lt;a href=&quot;https://docs.pytorch.org/cppdocs/installing.html&quot; target=_blank&gt;Installing C++ Distributions of PyTorch&lt;/a&gt; as a starting point.  However, their example is CPU based.  My desire is for a Cuda based installation.  This meant going to the &lt;a href=&quot;https://developer.nvidia.com/cuda-zone&quot; target=_blank&gt;CUDA Zone&lt;/a&gt; and start the Download process.  My configuration options were:  Linux, x86_64, Debian, 12, deb (local).

&lt;p&gt;Using the &quot;deb (local)&quot; with a complete file seemed to be the only way to ensure all components were available.

&lt;p&gt;The steps, as of this writing, were:

&lt;blockquote&gt;&lt;pre&gt;
wget https://developer.download.nvidia.com/compute/cuda/12.9.0/local_installers/cuda-repo-debian12-12-9-local_12.9.0-575.51.03-1_amd64.deb
sudo dpkg -i cuda-repo-debian12-12-9-local_12.9.0-575.51.03-1_amd64.deb
sudo cp /var/cuda-repo-debian12-12-9-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-9
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Install the open version of the nvidia drivers:

&lt;blockquote&gt;&lt;pre&gt;
sudo apt-get install -y nvidia-open
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;See if the nouveau driver is installed.

&lt;blockquote&gt;&lt;pre&gt;
$ lsmod |grep nouveau
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;If so, then run these commands to enable the nvidia driver and to blacklist the nouveau driver and reboot:

&lt;blockquote&gt;&lt;pre&gt;
sudo mv /etc/modprobe.d/nvidia.conf.dpkg-new  /etc/modprobe.d/nvidia.conf
sudo update-initramfs -u
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;There is also the &lt;a href=&quot;https://docs.nvidia.com/cuda/cuda-installation-guide-linux&quot; target=_blank&gt;NVIDIA CUDA Installation Guide for Linux&lt;/a&gt; for further information.

&lt;p&gt;The following changes are required for a successful compile of the example application below:

&lt;blockquote&gt;&lt;pre&gt;
$ diff math_functions.h /etc/alternatives/cuda/bin/../targets/x86_64-linux/include/crt/math_functions.h
2556c2556
&amp;lt; extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ double                 sinpi(double x);
---
&amp;gt; extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ double                 sinpi(double x) noexcept (true);
2579c2579
&amp;lt; extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ float                  sinpif(float x);
---
&amp;gt; extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ float                  sinpif(float x) noexcept (true);
2601c2601
&amp;lt; extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ double                 cospi(double x);
---
&amp;gt; extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ double                 cospi(double x) noexcept (true);
2623c2623
&amp;lt; extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ float                  cospif(float x);
---
&amp;gt; extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ float                  cospif(float x) noexcept (true);
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;use this file to fix the above:

&lt;blockquote&gt;&lt;pre&gt;
$ cat cuda_fix.sh
#!/bin/sh
header_file=/etc/alternatives/cuda/bin/../targets/x86_64-linux/include/crt/math_functions.h
sudo sed -i &#039;s/sinpi(double x);/sinpi(double x) noexcept (true);/&#039; $header_file
sudo sed -i &#039;s/sinpif(float x);/sinpif(float x) noexcept (true);/&#039; $header_file
sudo sed -i &#039;s/cospi(double x);/cospi(double x) noexcept (true);/&#039; $header_file
sudo sed -i &#039;s/cospif(float x);/cospif(float x) noexcept (true);/&#039; $header_file
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;The PyTorch LibTorch library can be downloaded from &lt;a href=&quot;https://pytorch.org/get-started/locally/&quot; target=_blank&gt;PyTorch Start Locally&lt;/a&gt;.  Choose the C++/Java option with Cuda 12.8 (as of this writing).  An appropriate link is presented.  Download and expand the file into a development directory.  LibTorch doesn&#039;t have at this moment a build for Cuda 12.9, but is referenced as 12.8.

&lt;p&gt;The most recent can be found at &lt;a href=&quot;https://download.pytorch.org/libtorch/nightly/cu128/libtorch-shared-with-deps-latest.zip&quot; target=_blank&gt;https://download.pytorch.org/libtorch/nightly/cu128/libtorch-shared-with-deps-latest.zip&lt;/a&gt;.

&lt;p&gt;It is probably advised to NOT use the Debian package, as it may be out of date:  &lt;a href=&quot;https://tracker.debian.org/pkg/pytorch-cuda&quot; target=_blank&gt;pytorch-cuda&lt;/a&gt;.

&lt;p&gt;Expand the libtorch package and deploy to /usr/local/share/libtorch.

&lt;p&gt;To test out the installation, I then created a subdirectory containing a couple of files.  The first is the test code example-app.cpp:

&lt;blockquote&gt;&lt;pre&gt;
#include &amp;lt;torch/torch.h&amp;gt;
#include &amp;lt;iostream&amp;gt;

int main() {
  torch::Tensor tensor = torch::rand({2, 3});
  std::cout &lt;&lt; tensor &lt;&lt; std::endl;
}
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;The second file is the CMakeLists.txt file.  This is my version:

&lt;blockquote&gt;&lt;pre&gt;
cmake_minimum_required(VERSION 3.18 FATAL_ERROR)

cmake_policy(SET CMP0104 NEW)
cmake_policy(SET CMP0105 NEW)
project(example-app)

find_package(Torch REQUIRED)
set(CMAKE_CXX_FLAGS &quot;${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}&quot;)
set(CMAKE_CUDA_STANDARD 17)

add_executable(example-app example-app.cpp)
target_link_libraries(example-app &quot;${TORCH_LIBRARIES}&quot;)
set_property(TARGET example-app PROPERTY CXX_STANDARD 17)
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Then to build the example:

&lt;blockquote&gt;&lt;pre&gt;
mkdir build
cmake \
  -DCMAKE_PREFIX_PATH=/usr/local/share/libtorch \
  -DCMAKE_CUDA_ARCHITECTURES=native \
  -DCMAKE_BUILD_TYPE=DEBUG \
  -DCMAKE_CUDA_COMPILER=/etc/alternatives/cuda/bin/nvcc \
  -Dnvtx3_dir=/usr/local/cuda/targets/x86_64-linux/include/nvtx3  \
  ..
make
./example-app
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Notes:

&lt;ul&gt;
  &lt;li&gt;PREFIX_PATH points to the directory of your expanded libtorch download
  &lt;li&gt;CMAKE_CUDA_ARCHITECTURES provides a &#039;native&#039; cuda solution, the build process will determine the specific gpu for which to build
  &lt;li&gt;CMAKE_BUILD_TYPE can be DEBUG or RELEASE
  &lt;li&gt;CMAKE_CUDA_COMPILER needs to be set, by using /etc/alternatives, these are softlinks to the version you desire (as were installed by the cuda installation)
  &lt;li&gt;nvtx3_dir is required, as the current libtorch library seems to still refer to nvtx and not nvtx3
  &lt;/ul&gt;

&lt;p&gt;If you get output along the lines of:

&lt;blockquote&gt;&lt;pre&gt;
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 5.0;8.0;8.6;8.9;9.0;9.0a;10.0;10.0a;10.1a;12.0;12.0a
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;My system has two RTX 4070 cards, and can be verified with (an extract is shown with important parts, noticing that the nvidia driver is properly shown):

&lt;blockquote&gt;&lt;pre&gt;
$ sudo lshw -c video
  *-display
    product: Arrow Lake-S [Intel Graphics]
    configuration: depth=32 &lt;bold&gt;driver=i915&lt;/bold&gt; latency=0 mode=3840x2160 resolution=3840,2160 visual=truecolor xres=3840 yres=2160
  *-display
    product: AD103 [GeForce RTX 4070]
    configuration: &lt;bold&gt;driver=nvidia&lt;/bold&gt; latency=0
  *-display
    product: AD103 [GeForce RTX 4070]
    configuration: &lt;bold&gt;driver=nvidia&lt;/bold&gt; latency=0
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Therefore, the output of my cmake process will include gpu specific selections:

&lt;blockquote&gt;&lt;pre&gt;
-- Autodetected CUDA architecture(s):  8.9 8.9
-- Added CUDA NVCC flags for: -gencode;arch=compute_89,code=sm_89
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;And running the generated binary results in valid output:

&lt;blockquote&gt;&lt;pre&gt;
$ ./example-app
0.7141  0.9744  0.3179
0.7794  0.9281  0.7529
[ CPUFloatType{2,3} ]
&lt;/pre&gt;&lt;/blockquote&gt;

 &lt;br /&gt;&lt;a href=&quot;https://blog.raymond.burkholder.net/index.php?/archives/1285-Installing-LibTorch-with-Cuda-on-NVIDIA-GeForce-RTX-4070.html#extended&quot;&gt;Continue reading &quot;Installing LibTorch with Cuda on NVIDIA GeForce RTX 4070&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 09 May 2025 03:09:46 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1285-guid.html</guid>
    
</item>
<item>
    <title>CMake</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1273-CMake.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1273-CMake.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1273</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1273</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://jennyjams.net/blog/cmake-pros/&quot; target=_blank&gt;CMake: the Good, the Bad, the Weird&lt;/a&gt; - ... strongly recommend for any developers who are learning or struggling with CMake to purchase Professional CMake -- I have found it very helpful in explaining things where most other resources haven&#039;t, and it is consistently updated with new major versions of CMake.
  &lt;/ul&gt; 
    </content:encoded>

    <pubDate>Sat, 14 Dec 2024 17:52:38 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1273-guid.html</guid>
    
</item>
<item>
    <title>C++ Header File Statistics</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1262-C++-Header-File-Statistics.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1262-C++-Header-File-Statistics.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1262</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1262</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;From &lt;a href=&quot;https://zeux.io/2010/11/15/include-rules/&quot; target=_blank&gt;#include &amp;lt;rules&amp;gt;&lt;/a&gt;, via &lt;a href=&quot;https://news.ycombinator.com/item?id=39249430&quot; target=_blank&gt;hacker news&lt;/a&gt;, two compile time options to consider:

&lt;ul&gt;
  &lt;li&gt;use the preprocessor output (cl /E, gcc -E)
  &lt;li&gt;use the include output (cl /showIncludes, gcc -M), gather the codebase statistics (average size after preprocessing, most included header files, header files with largest payload, etc.) 
  &lt;/ul&gt;

&lt;p&gt;I&#039;ve been doing this backwards, but I don&#039;t understand why though:

&lt;blockquote&gt;
The header file named after the source should be included first (to catch errors in the header)
&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Sun, 04 Feb 2024 14:02:56 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1262-guid.html</guid>
    
</item>
<item>
    <title>Boehm Garbage Collection, Cords String Handling</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1260-Boehm-Garbage-Collection,-Cords-String-Handling.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1260-Boehm-Garbage-Collection,-Cords-String-Handling.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1260</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1260</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;HackerNews had an article about &lt;a href=&quot;https://news.ycombinator.com/item?id=39077535&quot; target=_blank&gt;Boehm-Demers-Weiser conservative C/C++ Garbage Collector&lt;/a&gt; which leads to &lt;a href=&quot;A garbage collector for C and C++&quot; target=_blank&gt;A garbage collector for C and C++&lt;/a&gt;.

&lt;p&gt;It can be used in garbage collection mode or leak detection mode.

&lt;p&gt; The garbage collector distribution includes a C string (&lt;a href=&quot;https://hboehm.info/gc/gc_source/cordh.txt&quot; target=_blank&gt;cord&lt;/a&gt;) package that provides for fast concatenation and substring operations on long strings. A simple curses- and win32-based editor that represents the entire file as a cord is included as a sample application. From &lt;a href=&quot;https://en.wikipedia.org/wiki/Boehm_garbage_collector&quot; target=_blank&gt;Wikipedia&lt;/a&gt;:

&lt;blockquote&gt;
Boehm GC is also distributed with a &lt;a href=&quot;https://en.wikipedia.org/wiki/C_string_handling&quot; title=&quot;C string handling&quot;&gt;C string handling&lt;/a&gt; library called cords. This is similar to &lt;a href=&quot;https://en.wikipedia.org/wiki/Rope_(computer_science)&quot; class=&quot;mw-redirect&quot; title=&quot;Rope (computer science)&quot;&gt;ropes&lt;/a&gt; in C++ (&lt;a href=&quot;https://en.wikipedia.org/wiki/Tree_(data_structure)&quot; title=&quot;Tree (data structure)&quot;&gt;trees&lt;/a&gt; of constant small arrays), but instead of using reference counting for proper deallocation, it relies on garbage collection to free objects. Cords are good at handling very large texts, modifications to them in the middle, slicing, concatenating, and keeping history of changes (&lt;a href=&quot;https://en.wikipedia.org/wiki/Undo&quot; title=&quot;Undo&quot;&gt;undo&lt;/a&gt;/redo functionality).
&lt;/blockquote&gt;

&lt;p&gt;Code can be found at &lt;a href=&quot;https://github.com/ivmai/bdwgc/&quot; target=_blank&gt;github - The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (bdwgc, also known as bdw-gc, boehm-gc, libgc)&lt;/a&gt; 
    </content:encoded>

    <pubDate>Sun, 21 Jan 2024 16:39:38 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1260-guid.html</guid>
    
</item>
<item>
    <title>Parallelism and   Concurrency</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1256-Parallelism-and-Concurrency.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1256-Parallelism-and-Concurrency.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1256</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1256</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/2401.03353&quot; target=_blank&gt;HPX -- An open source C++ Standard Library for Parallelism and
  Concurrency&lt;/a&gt;

&lt;blockquote&gt;
To achieve scalability with today&#039;s heterogeneous HPC resources, we need a
dramatic shift in our thinking; MPI+X is not enough. Asynchronous Many Task
(AMT) runtime systems break down the global barriers imposed by the Bulk
Synchronous Programming model. HPX is an open-source, C++ Standards compliant
AMT runtime system that is developed by a diverse international community of
collaborators called The Ste||ar Group. HPX provides features which allow
application developers to naturally use key design patterns, such as
overlapping communication and computation, decentralizing of control flow,
oversubscribing execution resources and sending work to data instead of data to
work. The Ste||ar Group comprises physicists, engineers, and computer
scientists; men and women from many different institutions and affiliations,
and over a dozen different countries. We are committed to advancing the
development of scalable parallel applications by providing a platform for
collaborating and exchanging ideas. In this paper, we give a detailed
description of the features HPX provides and how they help achieve scalability
and programmability, a list of applications of HPX including two large NSF
funded collaborations (STORM, for storm surge forecasting; and STAR (OctoTiger)
an astro-physics project which runs at 96.8% parallel efficiency on 643,280
cores), and we end with a description of how HPX and the Ste||ar Group fit into
the open source community.
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/2401.03134&quot; target=_blank&gt;TimeGraphs: Graph-based Temporal Reasoning&lt;/a&gt;

&lt;blockquote&gt;
Many real-world systems exhibit temporal, dynamic behaviors, which are
captured as time series of complex agent interactions. To perform temporal
reasoning, current methods primarily encode temporal dynamics through simple
sequence-based models. However, in general these models fail to efficiently
capture the full spectrum of rich dynamics in the input, since the dynamics is
not uniformly distributed. In particular, relevant information might be harder
to extract and computing power is wasted for processing all individual
timesteps, even if they contain no significant changes or no new information.
Here we propose TimeGraphs, a novel approach that characterizes dynamic
interactions as a hierarchical temporal graph, diverging from traditional
sequential representations. Our approach models the interactions using a
compact graph-based representation, enabling adaptive reasoning across diverse
time scales. Adopting a self-supervised method, TimeGraphs constructs a
multi-level event hierarchy from a temporal input, which is then used to
efficiently reason about the unevenly distributed dynamics. This construction
process is scalable and incremental to accommodate streaming data. We evaluate
TimeGraphs on multiple datasets with complex, dynamic agent interactions,
including a football simulator, the Resistance game, and the MOMA human
activity dataset. The results demonstrate both robustness and efficiency of
TimeGraphs on a range of temporal reasoning tasks. Our approach obtains
state-of-the-art performance and leads to a performance increase of up to 12.2%
on event prediction and recognition tasks over current approaches. Our
experiments further demonstrate a wide array of capabilities including
zero-shot generalization, robustness in case of data sparsity, and adaptability
to streaming data flow.
&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Wed, 10 Jan 2024 03:47:38 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1256-guid.html</guid>
    
</item>
<item>
    <title>How to do a dynamic parser in X3?</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1246-How-to-do-a-dynamic-parser-in-X3.html</link>
            <category>Boost</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1246-How-to-do-a-dynamic-parser-in-X3.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1246</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1246</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=9QlPOYX8mgw&quot; target=_blank&gt;how to do a dynamic parser in X3?&lt;/a&gt;

&lt;blockquote&gt;
&lt;p&gt;The presentation went well, but as always with a large surface area
library like Spirit it went on for too long IMO (2 hrs).  This was
similar to what happened when I presented Spirit 2.x almost 10 yrs
ago.  If I were to present on this again, I would split the topic into
two talks:
&lt;ul&gt;
  &lt;li&gt;A background on recursive variant datatypes and visitor pattern and
dipping into the Fusion library for adapting arbitrary application
structures to Fusion tuples.
  &lt;li&gt;Spirit X3 parsing w/annotations and error handling.
  &lt;/ul&gt;
&lt;p&gt;I try to present from real code in the IDE as much as
possible so that we&#039;re looking at real code.  I almost always write
my own examples with the library I&#039;m presenting and put them on
github.  The exception is when the library comes with an example that
is everything I want to talk about &lt;img src=&quot;https://blog.raymond.burkholder.net/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;.

&lt;p&gt;I cribbed quite a bit from the spirit x3 fun example presented by
Michael Caisse a few years back, but I did extend the AST to handle
imaginary numbers.
&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Sun, 24 Sep 2023 00:26:51 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1246-guid.html</guid>
    
</item>
<item>
    <title>Stop VSCode from adding headers</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1228-Stop-VSCode-from-adding-headers.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1228-Stop-VSCode-from-adding-headers.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1228</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1228</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Visual Studio Code, by default, when using the clangd language server, will automatically insert headers files for types which may have already been declared.

&lt;p&gt;To disable this, go into the configuration options for clangd, and in &#039;clangd:arguments&#039; add:

&lt;blockquote&gt;
--header-insertion=never
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://stackoverflow.com/questions/74018901/stop-vscode-from-adding-redundant-headers&quot; target=_blank&gt;Stop VSCode from adding redundant headers&lt;/a&gt; 
    </content:encoded>

    <pubDate>Sun, 11 Jun 2023 18:04:01 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1228-guid.html</guid>
    
</item>
<item>
    <title>GCC Optimization for Native Architecture</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1183-GCC-Optimization-for-Native-Architecture.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1183-GCC-Optimization-for-Native-Architecture.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1183</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1183</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;When using Cern&#039;s ROOT Data Analysis Framework, there are notes about possible compile time enhancements.  It is best to take a look on which cpu variant the compiler will generate code, and for which target cpu the code will run.  They need to be compatible.

&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/AVX-512#CPUs_with_AVX-512&quot; target=_blank&gt;AVX-512&lt;/a&gt; is an interesting Wikipedia page describing the various cpu variant incarnations and their specialized instruction subsets.

&lt;p&gt;Here are a few command line examples for examining what the gcc compiler sees as being available.

&lt;blockquote&gt;&lt;pre&gt;
$ gcc -march=native -Q --help=target | grep march
  -march=                               skylake
  Known valid arguments for -march= option:
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;pre&gt;
$ echo | gcc -dM -E - -march=native
  ... large quantity of flags ...
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html&quot; target=_blank&gt;gcc x86 cpu options&lt;/a&gt; cmake command:

&lt;blockquote&gt;&lt;pre&gt;
add_definitions(-march=native)
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Even though this optimizes instruction use, it has to be used carefully.  It will probably cause side effects with compiling code on one version of cpu and when copying the executables to a different machine, with possibly a different cpu variant.

&lt;p&gt;Reference: &lt;a href=&quot;https://stackoverflow.com/questions/5470257/how-to-see-which-flags-march-native-will-activate&quot; target=_blank&gt;How to see which flags -march=native will activate?&lt;/a&gt; 
    </content:encoded>

    <pubDate>Sun, 27 Mar 2022 17:48:33 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1183-guid.html</guid>
    
</item>
<item>
    <title>C++ References</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1180-C++-References.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1180-C++-References.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1180</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1180</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;&lt;a href=&quot;https://www.foonathan.net/2019/02/special-member-functions/#content&quot; target=_blank&gt;Tutorial: When to Write Which Special Member&lt;/a&gt; - &quot;When explaining someone the rules behind the special member functions and when you need to write which one, there is this diagram that is always brought up. I don’t think the diagram is particularly useful for that, however.&quot;

&lt;p&gt;&lt;a href=&quot;https://www.foonathan.net/2018/10/cmake-warnings/&quot; target=_blank&gt;Tutorial: Managing Compiler Warnings with CMake&lt;/a&gt; - &quot;
But how do you manage the very compiler-specific flags in CMake? How do you prevent your header files from leaking warnings into other projects?&quot; 
    </content:encoded>

    <pubDate>Sun, 20 Mar 2022 12:29:16 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1180-guid.html</guid>
    
</item>
<item>
    <title>Papers 2022/02/05</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1175-Papers-20220205.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1175-Papers-20220205.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1175</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1175</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;&lt;a href=&quot;https://arxiv.org/abs/2202.00717&quot; target=_blank&gt;Pipeflow: An Efficient Task-Parallel Pipeline Programming Framework
  using Modern C++&lt;/a&gt;

&lt;blockquote&gt;
Pipeline is a fundamental parallel programming pattern. Mainstream pipeline
programming frameworks count on data abstractions to perform pipeline
scheduling. This design is convenient for data-centric pipeline applications
but inefficient for algorithms that only exploit task parallelism in pipeline.
As a result, we introduce a new task-parallel pipeline programming framework
called Pipeflow. Pipeflow does not design yet another data abstraction but
focuses on the pipeline scheduling itself, enabling more efficient
implementation of task-parallel pipeline algorithms than existing frameworks.
We have evaluated Pipeflow on both micro-benchmarks and real-world
applications. As an example, Pipeflow outperforms oneTBB 24% and 10% faster in
a VLSI placement and a timing analysis workloads that adopt pipeline
parallelism to speed up runtimes, respectively.
&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Sat, 05 Feb 2022 22:44:45 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1175-guid.html</guid>
    
</item>
<item>
    <title>3D Modelling Software - C++ API</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1083-3D-Modelling-Software-C++-API.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1083-3D-Modelling-Software-C++-API.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1083</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1083</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Since none of this is registered in github, here is my alternate mechanism for &#039;staring&#039; these items:

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.freecadweb.org/&quot; target=_blank&gt;FreeCAD&lt;/a&gt; - open-source parametric 3D modeler made primarily to design real-life objects of any size. Parametric modeling allows you to easily modify your design by going back into your model history and changing its parameters. You get modern Finite Element Analysis (FEA) tools, experimental CFD, dedicated BIM, Geodata or CAM/CNC workbenches, a robot simulation module that allows you to study robot movements and many more features.
  &lt;li&gt;&lt;a href=&quot;https://cppyy.readthedocs.io/en/latest/&quot; target=_blank&gt;cppyy: Automatic Python-C++ bindings&lt;/a&gt; - an automatic, run-time, Python-C++ bindings generator, for calling C++ from Python and Python from C++
  &lt;li&gt;&lt;a href=&quot;https://dev.opencascade.org/&quot; target=_blank&gt;Open CASCADE Technology, The Open Source 3D Modeling Libraries&lt;/a&gt; - is a software development kit (SDK) intended for development of applications dealing with 3D CAD data or requiring industrial 3D capabilities. It includes a set of C++ class libraries providing services for 3D surface and solid modeling, CAD data exchange, and visualization. &lt;a href=j&quot;https://documentation.help/Open-Cascade/occt__tutorial.html&quot; target=_blank&gt;tutorial&lt;/a&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.openstudio.net/&quot; target=_blank&gt;OpenStudio&lt;/a&gt; is a cross-platform (Windows, Mac, and Linux) collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
  &lt;li&gt;&lt;a href=&quot;https://topologic.app/software/&quot; target=_blank&gt;Topologic&lt;/a&gt; is a software development kit and plug-in that enables logical, hierarchical and topological representation of spaces and entities
  &lt;li&gt;&lt;a href=&quot;&quot; target=_blank&gt;&lt;/a&gt;
  &lt;li&gt;&lt;a href=&quot;&quot; target=_blank&gt;&lt;/a&gt;
  &lt;/ul&gt; 
    </content:encoded>

    <pubDate>Sat, 16 Jan 2021 20:30:24 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1083-guid.html</guid>
    
</item>
<item>
    <title>C++ Currency Library</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1064-C++-Currency-Library.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1064-C++-Currency-Library.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1064</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1064</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Some C++ libraries I&#039;ve encountered for managing currency manipulation:

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/vpiotr/decimal_for_cpp&quot; target=_blank&gt;vpiotr / decimal_for_cpp&lt;/a&gt; - this is the one I use for my currency work, is header based, succinct, and easy to use.
  &lt;li&gt;I was wondering if boost.multiprecision could be used, and came up with &lt;a href=&quot;https://github.com/mariusbancila/moneycpp&quot; target=_blank&gt; mariusbancila /
moneycpp &lt;/a&gt; - a bit too much for me as it also handles currency codes. There is a a blog entry: &lt;a href=&quot;https://mariusbancila.ro/blog/2018/11/13/moneycpp-a-cpp-library-for-handling-monetary-values/&quot; target=_blank&gt;moneycpp – a C++ library for handling monetary values&lt;/a&gt;.
  &lt;li&gt;&lt;a href=&quot;http://speleotrove.com/decimal/&quot; target=_blank&gt;General Decimal Arithmetic&lt;/a&gt; goes into some detail about the related IEEE 754 standard, as well as a link to  a C language implementation.
  &lt;/ul&gt; 
    </content:encoded>

    <pubDate>Sat, 09 May 2020 23:48:35 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1064-guid.html</guid>
    
</item>
<item>
    <title>Visual Studio Code with CMake and Clangd</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1037-Visual-Studio-Code-with-CMake-and-Clangd.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1037-Visual-Studio-Code-with-CMake-and-Clangd.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1037</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1037</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Continuing on in the search for a responsive IDE for building large C++ codesets with CMake, the next stop is 
&lt;a href=&quot;https://code.visualstudio.com/&quot; target=_blank&gt;Visual Studio Code&lt;/a&gt;.

&lt;p&gt;The initial install supplies a basic IDE editing environment.

&lt;p&gt;Usability occurs when extensions are loaded.  I have the following installed (versions are as of this writing):

&lt;ul&gt;
  &lt;li&gt;C/C++ for Visual Studio Code, v0.26, by Microsoft   &lt;== some sites say to disable this, but it is required by the debug function
  &lt;li&gt;CMake, v0.0.17, by twxs, which provides CMake language support
  &lt;li&gt;CMake Tools, v1.2.3, by Microsoft, which provides the build capability
  &lt;li&gt;vscode-clangd, v0.0.19, is the clang language server, which provides code completion and symbol tables
  &lt;/ul&gt;

&lt;p&gt;Prior to installation of the extensions, on Debian, I installed the following packages first (in addition to the standard compilers):

&lt;ul&gt;
  &lt;li&gt;cmake
  &lt;li&gt;clangd
  &lt;li&gt;clangd-9
  &lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;https://www.reddit.com/r/vscode/comments/coj8qw/protip_use_clangd_instead_of_the_official_cc/&quot; target=_blank&gt;reddit - PROTIP: Use clangd instead of the official C/C++ extension&lt;/a&gt; suggests adding the following to .vscode/settings.json:

&lt;blockquote&gt;&lt;pre&gt;
&quot;C_Cpp.autocomplete&quot;: &quot;Disabled&quot;,
&quot;C_Cpp.formatting&quot;: &quot;Disabled&quot;,
&quot;C_Cpp.errorSquiggles&quot;: &quot;Disabled&quot;,
&quot;C_Cpp.intelliSenseEngine&quot;: &quot;Disabled&quot;,
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;In addition, I have a more recent version of clangd, so in .vscode/settings.json, I also have:

&lt;blockquote&gt;&lt;pre&gt;
&quot;clangd.path&quot;: &quot;/usr/lib/llvm-9/bin/clangd&quot;,
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;My over all file looks like:

&lt;blockquote&gt;&lt;pre&gt;
{
  &quot;clangd.path&quot;: &quot;/usr/lib/llvm-9/bin/clangd&quot;,
  &quot;C_Cpp.autocomplete&quot;: &quot;Disabled&quot;,
  &quot;C_Cpp.formatting&quot;: &quot;Disabled&quot;,
  &quot;C_Cpp.errorSquiggles&quot;: &quot;Disabled&quot;,
  &quot;C_Cpp.intelliSenseEngine&quot;: &quot;Disabled&quot;,
  &quot;C_Cpp.default.intelliSenseMode&quot;: &quot;clang-x64&quot;,
  &quot;editor.tabSize&quot;: 2
}
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;In the root directory of the project, a link is required (the setting &quot;compileCommands&quot; in .vscode/c_cpp_properties.json does not appear to be used by the clangd module) :

&lt;blockquote&gt;&lt;pre&gt;
ln -s build/compile_commands.json .
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;2023/11/05 - Or add the following to .vscode/settings.json  (which causes the file to be created and referenced directly in the basic workspace directory):

&lt;blockquote&gt;&lt;pre&gt;
&quot;cmake.copyCompileCommands&quot;: &quot;${workspaceFolder}/compile_commands.json&quot;
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;As a  note, if compile_commands.json is not provided, then the following flag needs to be passed to CMake (seems to be defaulted &quot;on&quot; in current Visual Studio Code):

&lt;blockquote&gt;&lt;pre&gt;
-DCMAKE_EXPORT_COMPILE_COMMANDS=1
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Documentation for clangd is found at &lt;a href=&quot;https://clang.llvm.org/extra/clangd/Installation.html#installing-clangd&quot; target=_blank&gt;Getting started with clangd&lt;/a&gt;. 
    </content:encoded>

    <pubDate>Sun, 22 Dec 2019 03:40:30 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1037-guid.html</guid>
    
</item>
<item>
    <title>CMake</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/997-CMake.html</link>
            <category>C++</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/997-CMake.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=997</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=997</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;As a continuation of my other article incorporating CMake as a makefile generator, here are some references I used for getting a handle on how to build a set of CMakeLists.txt files
to manage a project containing a library shared by two applications.

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.foonathan.net/2018/10/cmake-warnings/&quot; target=_blank&gt;Tutorial: Managing Compiler Warnings with CMake&lt;/a&gt; - But how do you manage the very compiler-specific flags in CMake? How do you prevent your header files from leaking warnings into other projects?
  &lt;li&gt;&lt;a href=&quot;https://cmake.org/cmake-tutorial/&quot; target=_blank&gt;cmake.org tutorial&lt;/a&gt;
  &lt;li&gt;&lt;a href=&quot;https://cmake.org/cmake/help/latest/index.html&quot; target=_blank&gt;Reference Guide&lt;/a&gt; - direct from cmake.org
  &lt;li&gt;&lt;a href=&quot;https://gitlab.kitware.com/cmake/community/wikis/home&quot; target=_blank&gt;CMake Community Wiki&lt;/a&gt;
  &lt;li&gt;&lt;a href=&quot;https://wiki.wxwidgets.org/CMake&quot; target+_blank&gt;wxWiki&lt;/a&gt; - using CMake to include  wxWidgets in projects - see below for sample
  &lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/tagged/cmake?sort=votes&amp;pagesize=50&quot; target=_blank&gt;stack overflow&lt;/a&gt; - Questions tagged [cmake] - the popular entries
  &lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/44849511/multiple-sub-projects-depending-on-the-same-library&quot; target=_blank&gt;stack overflow&lt;/a&gt; - Multiple sub-projects depending on the same library - primary source for skeleton entries for a project with inter-dependent apps and libraries.
  &lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/15423821/cmake-static-library-with-multiple-projects&quot; target=_blank&gt;stack overflow&lt;/a&gt; - CMake: Static library with multiple projects - Normally, when CMake projects have to cooperate, it&#039;s beneficial to make them part of the same buildsystem using add_subdirectory(). That way, CMake can track dependency between their targets, automatically resolve references to logical target names etc.
  &lt;li&gt;&lt;a href=&quot;http://www.kaizou.org/2014/11/typical-cmake-project/&quot; target=_blank&gt;Typical Linux Project using CMake&lt;/a&gt; - goes into detail for a project with libraries and applications, including external  dependencis
  &lt;li&gt;&lt;a href=&quot;https://floooh.github.io/2016/01/12/cmake-dependency-juggling.html&quot; target=_blank&gt;CMake Dependencies Done Right&lt;/a&gt; - mechanisms to evolve a CMake file - depend on defining a proper dependency tree for all libraries and executables 
  &lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/14446495/cmake-project-structure-with-unit-tests&quot; target=_blank&gt;stack overflow&lt;/a&gt; - CMake: Project structure with unit tests
  &lt;li&gt;&lt;a href=&quot;https://codereview.stackexchange.com/questions/176508/basic-cmake-c-project-structure&quot; target=_blank&gt;Basic CMake C++ project structure&lt;/a&gt; - includes an example of ExternalProject_Add - also with style notes in one of the answers
  &lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/13315312/cmake-setting-up-release-and-debug-version-and-flags&quot; target=_blank&gt;stack overflow&lt;/a&gt; - CMake Setting up Release and Debug version and Flags &#039;cmake -DCMAKE_BUILD_TYPE=Release .. &#039;, &#039;cmake -DCMAKE_BUILD_TYPE=Debug .. &#039;
  &lt;li&gt;&lt;a href=&quot;https://jvgomez.github.io/pages/how-to-configure-a-cc-project-with-eclipse-and-cmake.html&quot; target=_blank&gt;How to configure a C/C++ project with Eclipse and CMake&lt;/a&gt; - manual mechanism when not using the wizard from the gui - talks about debug/release versions - something which isn&#039;t intuitively obvious when using the gui wizard for importing a CMake progject
  &lt;li&gt;&lt;a href=&quot;https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/&quot; target=_blank&gt;It&#039;s Time To Do CMake Right&lt;/a&gt; - Pablo Arias - Build Requirements vs Usage Requirements - defines public, private, interface plus additional concepts
  &lt;li&gt;&lt;a href=&quot;https://mirkokiefer.com/cmake-by-example-f95eb47d45b1&quot; target=_blank&gt;Mirko Kiefer&#039;s Blog&lt;/a&gt; - CMake by Example - a few twists on the simple CMake files with a focus on the &#039;install&#039; concept
  &lt;li&gt;&lt;a href=&quot;https://github.com/ttroy50/cmake-examples&quot; target=_blank&gt;CMake Examples&lt;/a&gt; on github.  There is something to be learned from each example [added  2019/0917]
  &lt;li&gt;&lt;a href=&quot;https://arne-mertz.de/2018/07/cmake-properties-options/&quot; target=_blank&gt;CMake – Properties and Options&lt;/a&gt; - conditionals - which shares an example with 
&lt;a href=&quot;https://cmake.org/cmake/help/latest/command/add_compile_options.html&quot; target=_blank&gt;CMAKE compile options&lt;/a&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/dendisuhubdy/libtorch_examples/blob/master/CMakeLists.txt&quot; targets=_blank&gt; dendisuhubdy / libtorch_examples &lt;/a&gt; - has an example of how to use custom commands [could be used with my libs-build]
  &lt;li&gt;2020/02/25 &lt;a href=&quot;http://felipepiovezan.gitlab.io/blog/build_system_p2/&quot; target=_blank&gt;CMake is not a build system&lt;/a&gt; - brief walk through of key features.
  &lt;li&gt;2021/05/23 &lt;a href=&quot;https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1&quot; target=_blank&gt;Effective Modern CMake&lt;/a&gt; - many &#039;thou shalts&#039;, but few examples on what it means, other than that, effective starting point on the research journey
  &lt;/ul&gt;
&lt;p&gt;wxWidgets inclusion with CMake

&lt;blockquote&gt;&lt;pre&gt;
project(myGreatProject)
cmake_minimum_required(VERSION 2.&lt;img src=&quot;https://blog.raymond.burkholder.net/templates/default/img/emoticons/cool.png&quot; alt=&quot;8-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;
aux_source_directory(. SRC_LIST)

set(wxWidgets_CONFIGURATION mswu)
find_package(wxWidgets COMPONENTS core base REQUIRED)
include(${wxWidgets_USE_FILE})

add_executable(${PROJECT_NAME} ${SRC_LIST})
target_link_libraries(${PROJECT_NAME} ${wxWidgets_LIBRARIES})
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Random note:
&lt;blockquote&gt;
${CMAKE_SOURCE_DIR}, ${CMAKE_BINARY_DIR}
&lt;/blockquote&gt;

&lt;p&gt;Generator for ninja:

&lt;blockquote&gt;
cmake -G Ninja.
&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Fri, 05 Apr 2019 03:52:25 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/997-guid.html</guid>
    
</item>

</channel>
</rss>
