| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
constexpr is like const but (for variables) guarantees evaluation at
compile time (as opposed to runtime).
Likely this change will do nothing on its own (though it could, since
it gives the compiler more information). But it still has benefits.
It allows programmer to know that initialization is not expensive (it
was done at compile time), and reduces risk of a refactoring
regressing the compiletimeness.
Runtime initialization can be nonobvious in larger codebases. E.g.:
struct S {
static int foo();
};
const int bar = S::foo(); // Called and initialized at *runtime*.
int S::foo() { return 10; }
With constexpr:
struct S {
static constexpr int foo();
};
constexpr int bar = S::foo(); // Error: used before definition.
constexpr int S::foo() { return 10; }
Initializing at runtime is not just startup costs, but also can save
memory since it'll end up in a R/O section of a binary and therefore
doesn't need to be swapped out, but can be shared (in the mmap() sense
of the word).
|
| |
|
|
|
|
| |
This reverts commit a16ed67b5dae099c6ac1447c000f15765b13422f.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The RPC aggregator and friends were taking callback objects passed by
value, and then internally called, again by value, constructors which
initialized reference fields to these parameters.
This has the effect of storing references to temporary objects. Chances
are, no-one is using that code, or compiler UB saved our collective
behinds.
In any case, we might need to more carefully dissect the RPC code. There
be dragons.
|
|
|
|
|
|
|
|
| |
block's message handler.
We still need to register this in setup_rpc, but there might be a way
to automate the registering of this during set_msg_handler if
ControlPort is enabled.
|
|
|
|
| |
This is very similar and accessed like a 'set' function only it does not take a parameter; it simply calls a function. Meant to toggle an action, like reseting the performance counters or locking/unlocking the flowgraph.
|
|
|
|
|
|
| |
Vectors of complex are still passed as interleaved. Single values can be passed as GNURadio::complex. ControlPort can translate these in GNU Radio to gr_complex; Python programs need to convert themselves. gr-ctrl-monitor updated to handle this.
multiply_const_cc block updated to export get and set of k value through ControlPort.
|
|
|