Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonas Plewinski
pystencils
Commits
f925f890
Commit
f925f890
authored
Jan 24, 2019
by
Martin Bauer
Browse files
New code generation interface for waLBerla
parent
19f9750d
Changes
4
Hide whitespace changes
Inline
Side-by-side
__init__.py
View file @
f925f890
...
...
@@ -6,7 +6,7 @@ from .slicing import make_slice
from
.kernelcreation
import
create_kernel
,
create_indexed_kernel
,
create_staggered_kernel
from
.display_utils
import
show_code
,
to_dot
from
.simp
import
AssignmentCollection
from
.assignment
import
Assignment
from
.assignment
import
Assignment
,
assignment_from_stencil
from
.sympyextensions
import
SymbolCreator
from
.datahandling
import
create_data_handling
from
.kernel_decorator
import
kernel
...
...
@@ -20,6 +20,7 @@ __all__ = ['Field', 'FieldType', 'fields',
'show_code'
,
'to_dot'
,
'AssignmentCollection'
,
'Assignment'
,
'assignment_from_stencil'
,
'SymbolCreator'
,
'create_data_handling'
,
'kernel'
,
...
...
cpu/vectorization.py
View file @
f925f890
...
...
@@ -36,6 +36,9 @@ def vectorize(kernel_ast: ast.KernelFunction, instruction_set: str = 'avx',
depending on the access pattern there might be additional padding
required at the end of the array
"""
if
instruction_set
is
None
:
return
all_fields
=
kernel_ast
.
fields_accessed
if
nontemporal
is
None
or
nontemporal
is
False
:
nontemporal
=
{}
...
...
datahandling/parallel_datahandling.py
View file @
f925f890
...
...
@@ -383,4 +383,3 @@ class ParallelDataHandling(DataHandling):
def
load_all
(
self
,
directory
):
for
field_name
,
data_name
in
self
.
_field_name_to_cpu_data_name
.
items
():
self
.
blocks
.
readBlockData
(
data_name
,
os
.
path
.
join
(
directory
,
field_name
+
".dat"
))
gpucuda/indexing.py
View file @
f925f890
...
...
@@ -7,7 +7,7 @@ from pystencils.slicing import normalize_slice
from
pystencils.data_types
import
TypedSymbol
,
create_type
from
functools
import
partial
AUTO_BLOCK_SIZE_LIMITING
=
Tru
e
AUTO_BLOCK_SIZE_LIMITING
=
Fals
e
BLOCK_IDX
=
[
TypedSymbol
(
"blockIdx."
+
coord
,
create_type
(
"int"
))
for
coord
in
(
'x'
,
'y'
,
'z'
)]
THREAD_IDX
=
[
TypedSymbol
(
"threadIdx."
+
coord
,
create_type
(
"int"
))
for
coord
in
(
'x'
,
'y'
,
'z'
)]
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment