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
Merge requests
!219
Make RNG vectorization more robust
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Make RNG vectorization more robust
vectorization
into
master
Overview
0
Commits
2
Pipelines
1
Changes
2
Merged
Michael Kuron
requested to merge
vectorization
into
master
4 years ago
Overview
0
Commits
2
Pipelines
1
Changes
2
Expand
Follow-up to
!216 (merged)
. Needed for
walberla/walberla!414 (merged)
.
Edited
4 years ago
by
Michael Kuron
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
8938e90a
2 commits,
4 years ago
2 files
+
4
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
pystencils/rng.py
+
2
−
2
Options
@@ -2,7 +2,7 @@ import copy
import
numpy
as
np
import
sympy
as
sp
from
pystencils.data_types
import
TypedSymbol
from
pystencils.data_types
import
TypedSymbol
,
cast_func
from
pystencils.astnodes
import
LoopOverCoordinate
from
pystencils.backends.cbackend
import
CustomCodeNode
from
pystencils.sympyextensions
import
fast_subs
@@ -47,7 +47,7 @@ class RNGBase(CustomCodeNode):
def
get_code
(
self
,
dialect
,
vector_instruction_set
,
print_arg
):
code
=
"
\n
"
for
r
in
self
.
result_symbols
:
if
vector_instruction_set
and
isinstance
(
self
.
args
[
1
]
,
sp
.
Integer
):
if
vector_instruction_set
and
not
self
.
args
[
1
]
.
atoms
(
cast_func
):
# this vector RNG has become scalar through substitution
code
+=
f
"
{
r
.
dtype
}
{
r
.
name
}
;
\n
"
else
:
Loading