kompute icon indicating copy to clipboard operation
kompute copied to clipboard

Kompute.hpp - how to generate and why?

Open COM8 opened this issue 3 years ago • 0 comments

I noticed Kompute.hpp contains just a copy of all other headers. Is there any reason for not doing something like this:

#pragma once

#include <Tensor.hpp>
#include <Sequence.hpp>
// ...

Since then the preprocessor will take over the task of expanding all #include macros for us. An example of that can be found here: https://github.com/libcpr/cpr/blob/master/include/cpr/cpr.h

Then we also get rid of all the logic for compiling either Kompute as a single header via KOMPUTE_OPT_BUILD_SINGLE_HEADER.

COM8 avatar May 18 '22 08:05 COM8