Revision f2143bf0a4fca92bbb8e3064c30a8dcafdbc6d21 authored by Steven Johnson on 30 March 2021, 19:29:32 UTC, committed by GitHub on 30 March 2021, 19:29:32 UTC
* Add a way to set a GeneratorInput's type in code

Currently, if you want to vary the type of a Generator's inputs or outputs, you have to specify the types in the makefile. This can be awkward for things with complex logic. This PR proposes adding a way to do this: a new `set_type()` method which can only be called from the rarely-used Generator::configure() method. It only allows setting the type for an input or output that has no type specified.

I'm not 100% sure if this is a good idea, but for certain rare corner cases, it may be quite handy.

(Note that extending this to allow specifying dimensions and/or array size in the same way might be handy, but is omitted from this PR.)

* Update Generator.h

* Also add set_dimensions, set_array_size
1 parent 2dd7a6b
History
File Mode Size
.github
apps
cmake
dependencies
doc
packaging
python_bindings
src
test
tools
tutorial
util
.clang-format -rw-r--r-- 1.4 KB
.clang-format-ignore -rw-r--r-- 265 bytes
.clang-tidy -rw-r--r-- 1.7 KB
.gitattributes -rw-r--r-- 342 bytes
.gitignore -rw-r--r-- 1.1 KB
.gitmodules -rw-r--r-- 0 bytes
CMakeLists.txt -rw-r--r-- 5.3 KB
CMakePresets.json -rw-r--r-- 2.4 KB
CODE_OF_CONDUCT.md -rw-r--r-- 3.5 KB
LICENSE.txt -rw-r--r-- 3.2 KB
Makefile -rw-r--r-- 99.9 KB
README.md -rw-r--r-- 14.8 KB
README_cmake.md -rw-r--r-- 69.1 KB
README_rungen.md -rw-r--r-- 12.1 KB
README_webassembly.md -rw-r--r-- 7.5 KB
run-clang-format.sh -rwxr-xr-x 1.4 KB
run-clang-tidy.sh -rwxr-xr-x 3.1 KB

README.md

back to top