Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils
Commits
5ca45f2b
Commit
5ca45f2b
authored
6 months ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
fix doc errors from recent merge
parent
9cb46e2d
No related branches found
No related tags found
1 merge request
!425
Refactor and Improve Documentation
Pipeline
#70263
passed
6 months ago
Stage: Code Quality
Stage: Unit Tests
Stage: legacy_test
Stage: docs
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pystencils/backend/kernelcreation/iteration_space.py
+12
-0
12 additions, 0 deletions
src/pystencils/backend/kernelcreation/iteration_space.py
with
12 additions
and
0 deletions
src/pystencils/backend/kernelcreation/iteration_space.py
+
12
−
0
View file @
5ca45f2b
...
@@ -193,22 +193,27 @@ class FullIterationSpace(IterationSpace):
...
@@ -193,22 +193,27 @@ class FullIterationSpace(IterationSpace):
@property
@property
def
dimensions
(
self
):
def
dimensions
(
self
):
"""
The dimensions of this iteration space
"""
return
self
.
_dimensions
return
self
.
_dimensions
@property
@property
def
lower
(
self
):
def
lower
(
self
):
"""
Lower limits of each dimension
"""
return
(
dim
.
start
for
dim
in
self
.
_dimensions
)
return
(
dim
.
start
for
dim
in
self
.
_dimensions
)
@property
@property
def
upper
(
self
):
def
upper
(
self
):
"""
Upper limits of each dimension
"""
return
(
dim
.
stop
for
dim
in
self
.
_dimensions
)
return
(
dim
.
stop
for
dim
in
self
.
_dimensions
)
@property
@property
def
steps
(
self
):
def
steps
(
self
):
"""
Iteration steps of each dimension
"""
return
(
dim
.
step
for
dim
in
self
.
_dimensions
)
return
(
dim
.
step
for
dim
in
self
.
_dimensions
)
@property
@property
def
archetype_field
(
self
)
->
Field
|
None
:
def
archetype_field
(
self
)
->
Field
|
None
:
"""
Field whose shape and memory layout act as archetypes for this iteration space
'
s dimensions.
"""
return
self
.
_archetype_field
return
self
.
_archetype_field
@property
@property
...
@@ -231,6 +236,13 @@ class FullIterationSpace(IterationSpace):
...
@@ -231,6 +236,13 @@ class FullIterationSpace(IterationSpace):
def
actual_iterations
(
def
actual_iterations
(
self
,
dimension
:
int
|
FullIterationSpace
.
Dimension
|
None
=
None
self
,
dimension
:
int
|
FullIterationSpace
.
Dimension
|
None
=
None
)
->
PsExpression
:
)
->
PsExpression
:
"""
Construct an expression representing the actual number of unique points inside the iteration space.
Args:
dimension: If an integer or a `Dimension` object is given, the number of iterations in that
dimension is computed. If `None`, the total number of iterations inside the entire space
is computed.
"""
from
.typification
import
Typifier
from
.typification
import
Typifier
from
..transformations
import
EliminateConstants
from
..transformations
import
EliminateConstants
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment