Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pystencils-sfg
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Christoph Alt
pystencils-sfg
Commits
f02641fe
Commit
f02641fe
authored
6 months ago
by
Christoph Alt
Browse files
Options
Downloads
Patches
Plain Diff
using get_dtype() to get the full typename
parent
f8ed8ad8
No related branches found
No related tags found
No related merge requests found
Pipeline
#70784
passed
6 months ago
Stage: Code Quality
Stage: Tests
Stage: Documentation
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/lang/test_sycl_accessor.py
+3
-8
3 additions, 8 deletions
tests/lang/test_sycl_accessor.py
with
3 additions
and
8 deletions
tests/lang/test_sycl_accessor.py
+
3
−
8
View file @
f02641fe
...
@@ -10,13 +10,11 @@ import pystencils as ps
...
@@ -10,13 +10,11 @@ import pystencils as ps
def
test_spatial_field
(
data_type
,
dim
):
def
test_spatial_field
(
data_type
,
dim
):
f
=
ps
.
fields
(
f
"
f:
{
data_type
}
[
{
dim
}
D]
"
)
f
=
ps
.
fields
(
f
"
f:
{
data_type
}
[
{
dim
}
D]
"
)
ref
=
sycl_accessor_ref
(
f
)
ref
=
sycl_accessor_ref
(
f
)
assert
(
assert
f
"
sycl::accessor<
{
data_type
}
,
{
dim
}
> &
"
in
str
(
ref
.
get_dtype
())
f
"
sycl::accessor<
{
data_type
}
,
{
dim
}
> &
"
in
ref
.
as_variable
().
name_and_type
()
)
@pytest.mark.parametrize
(
"
data_type
"
,
[
"
double
"
,
"
float
"
])
@pytest.mark.parametrize
(
"
data_type
"
,
[
"
double
"
,
"
float
"
])
def
test_to_large_dim
(
data_type
):
def
test_to
o
_large_dim
(
data_type
):
dim
=
4
dim
=
4
f
=
ps
.
fields
(
f
"
f:
{
data_type
}
[
{
dim
}
D]
"
)
f
=
ps
.
fields
(
f
"
f:
{
data_type
}
[
{
dim
}
D]
"
)
with
pytest
.
raises
(
ValueError
):
with
pytest
.
raises
(
ValueError
):
...
@@ -32,10 +30,7 @@ def test_index_field(data_type, spatial_dim, index_dims):
...
@@ -32,10 +30,7 @@ def test_index_field(data_type, spatial_dim, index_dims):
f
=
ps
.
fields
(
f
"
f(
{
'
,
'
.
join
(
index_shape
)
}
):
{
data_type
}
[
{
spatial_dim
}
D]
"
)
f
=
ps
.
fields
(
f
"
f(
{
'
,
'
.
join
(
index_shape
)
}
):
{
data_type
}
[
{
spatial_dim
}
D]
"
)
if
total_dims
<=
3
:
if
total_dims
<=
3
:
ref
=
sycl_accessor_ref
(
f
)
ref
=
sycl_accessor_ref
(
f
)
assert
(
assert
f
"
sycl::accessor<
{
data_type
}
,
{
total_dims
}
> &
"
in
str
(
ref
.
get_dtype
())
f
"
sycl::accessor<
{
data_type
}
,
{
total_dims
}
> &
"
in
ref
.
as_variable
().
name_and_type
()
)
else
:
else
:
with
pytest
.
raises
(
ValueError
):
with
pytest
.
raises
(
ValueError
):
sycl_accessor_ref
(
f
)
sycl_accessor_ref
(
f
)
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