-
Notifications
You must be signed in to change notification settings - Fork 153
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
fix(lifetime): extending the lifetime of temporary objects #160
base: develop
Are you sure you want to change the base?
Commits on Feb 9, 2022
-
fix(lifetime): extending the lifetime of temporary objects
Fix for issue #125. The current implementation does not take into account the prvalue that creates an issue while storing it. The prvalue is destroyed after the end of its scope, and if you try access it, you are entering into undefined land of C++. To solve this issue, we employ the trait `std::is_lvalue_reference` to determine if need to extend the lifetime or not. If extension is needed, we store the value with the help of universal forwarding. Otherwise, we extend lifetime using `const &`.
Configuration menu - View commit details
-
Copy full SHA for 15c4476 - Browse repository at this point
Copy the full SHA 15c4476View commit details
Commits on Feb 10, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8f5a5d1 - Browse repository at this point
Copy the full SHA 8f5a5d1View commit details -
refactor(comparision): decoupled
if constexpr
and cleaned-up compare.Decoupled each `constexpr if` conditions into function using requires clause, which cleaned-up the compare function. Also, added the check for static extents that removes the runtime check.
Configuration menu - View commit details
-
Copy full SHA for 8178c6c - Browse repository at this point
Copy the full SHA 8178c6cView commit details
Commits on Feb 12, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 9b8c4e1 - Browse repository at this point
Copy the full SHA 9b8c4e1View commit details -
fix(test): bind the prvalue (=3) to a variable
Since the patch is fixing the lifetime of the tensor, we cannot combine a prvalue with the old ublas expression. Therefore, we have to bind the prvalue with the name to increase the lifetime.
Configuration menu - View commit details
-
Copy full SHA for d70a701 - Browse repository at this point
Copy the full SHA d70a701View commit details
Commits on Feb 13, 2022
-
refactor(expression): add function cast_tensor_expression for casting
This function casts any `tensor_expression` to its child class, and it also handles recursive casting to get the real expression that is stored inside the layers of `tensor_expression`.
Configuration menu - View commit details
-
Copy full SHA for 8ec747c - Browse repository at this point
Copy the full SHA 8ec747cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a936dd - Browse repository at this point
Copy the full SHA 7a936ddView commit details -
refactor(comparision): remove the construction of a whole new tensor
Previously, we would create a new tensor from the expression template every time there is a comparision. Also, fixed the spelling to `cast_tensor_expression` from `cast_tensor_exression`.
Configuration menu - View commit details
-
Copy full SHA for b6a3dd8 - Browse repository at this point
Copy the full SHA b6a3dd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a013d0 - Browse repository at this point
Copy the full SHA 3a013d0View commit details
Commits on Feb 14, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7b23092 - Browse repository at this point
Copy the full SHA 7b23092View commit details -
Configuration menu - View commit details
-
Copy full SHA for a90573c - Browse repository at this point
Copy the full SHA a90573cView commit details
Commits on Feb 15, 2022
-
fix(expression): disable the move constructor for public use to avoid…
… undefined behaviour
Configuration menu - View commit details
-
Copy full SHA for 2abe215 - Browse repository at this point
Copy the full SHA 2abe215View commit details -
refactor(expression): clean unnecessary code and fix the comparision …
…between different extents types
Configuration menu - View commit details
-
Copy full SHA for 51674d5 - Browse repository at this point
Copy the full SHA 51674d5View commit details -
refactor(expression): use
std::invoke
and add types to functional o……bjects to catch type errors
Configuration menu - View commit details
-
Copy full SHA for b7de038 - Browse repository at this point
Copy the full SHA b7de038View commit details
Commits on Feb 16, 2022
-
refactor(expression): add
noexcept
, rearrange constructors, and rem……ove redundant casting
Configuration menu - View commit details
-
Copy full SHA for bc0afbd - Browse repository at this point
Copy the full SHA bc0afbdView commit details -
fix(test): remove the undefined behaviour if the type is not FP
The standard does not define the complex class other than float, double, and long double. It leaves the implementation on the hands of vendors, and it could lead to the portability issue or undefined behaviour, which is not warranted.
Configuration menu - View commit details
-
Copy full SHA for 00357a0 - Browse repository at this point
Copy the full SHA 00357a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 549f8a0 - Browse repository at this point
Copy the full SHA 549f8a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23ba8fc - Browse repository at this point
Copy the full SHA 23ba8fcView commit details