-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can index annotation be somehow compile-time? #46
Comments
Note that this is kind of related to #44. |
I think this is basically not doable at compile time, unless annotation is On Tue, Jun 24, 2014 at 7:21 AM, Toru Shiozaki [email protected]
|
I think we need to think of how to make this interface robust. Typical bugs I have created in this few days are calling contract with wrong annotation (an overly simplified version is the following)
I believe this should be checked at compile time (yes I can throw at runtime, but it's not quite beautiful in terms of philosophy). |
I assume you don't mean the error due to the lack of comma between c and On Wed, Jun 25, 2014 at 3:29 PM, Toru Shiozaki [email protected]
web: valeyev.net |
This is related to adaption of C++14. In C++14 std::initializer_list::begin and end are constexpr, which makes this check possible. @evaleev of course (sorry for a typo) |
There would still be a version that works for dynamic annotation lists, correct? In ITensor the contraction info is only known at runtime. |
Yes, I think we need to support both. But the following check can be done in both cases?
|
As long as it is specified by initialier_list of constexpr int, there must be a way in theory (In practice I do not know). If it would be very powerful for optimization... The following is the current interface.
The text was updated successfully, but these errors were encountered: