Open jkwak-work opened 1 month ago
Should be documented as not working.
I am leaving a note from our discussion.
The implementation of constexpr
hasn't been never been completed.
We will make a document to keep track of features like this and follow up.
This task is WNF for now and revisit later when the priority arise.
Assigning to @swoods-nv to get a doc tracking of unfinished features.
Problem description When
constexpr
is used on a function, the return value is expected to be available at compile-time. But it doesn't seem to be working as expected.Repro The following code shows a simple function, "LoopCount", that returns a given input. It has
constexpr
on the return type and the input type. But it leads to an error when used for[ForceUnroll]
.The error message is also a little unclear what the real problem is. It shows that the variable, "i", is not a compile-time constant, which is true but not a real reason for the error.
Goal We should make
constexpr
working for functions. Or we should describe the limitation on our document.