-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These are used for describe the computation wanted for the generated code. The main type is `Routine`, which takes in a name, arguments, and results. An easy interface `routine` is also created that makes common assumptions about what the user wants. This allows finer control for users that want it, while still having an easy interface. Routines cannot be used in expression trees, but they can be called as a function, resulting in a `RoutineCall` type. This type has two attributes: `returns` and `inplace`. The `returns` attr returns a `RoutineCallResult` representing the result for what is directly returned. A `Tuple` of these is returned if there is more than one result. The `inplace` attr returns a dict of `symbol` -> `RoutineCallResult`, which represents results returned "inplace". The `RoutineCallResult` types "alias" all assumptions to what the underlying computation represented would be. This means they can be used inside sympy expressions. This design makes it easy to call generated routines from other routines, while keeping everything modular and expressive. At this point only `ScalarRoutineCallResult` is implemented. Corresponding types for Matrices (and later Indexed) still need to be done.
- Loading branch information
Showing
9 changed files
with
471 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ import pytest | |
import sys | ||
|
||
path_hack() | ||
sys.exit(pytest.main()) | ||
sys.exit(pytest.main('-s')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
from .generators import * | ||
from .printers import * | ||
from .utilities import * | ||
from .types import * | ||
from .wrappers import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.