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
d3a4ce73
"tests/test_gpu.py" did not exist on "33dc8ae98bdb61871fd894120c2e603a85154431"
Commit
d3a4ce73
authored
1 year ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
moved itemsize
parent
f721e167
No related branches found
No related tags found
No related merge requests found
Pipeline
#60468
failed
1 year ago
Stage: pretest
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pystencils/nbackend/jit/cpu_extension_module.py
+1
-1
1 addition, 1 deletion
src/pystencils/nbackend/jit/cpu_extension_module.py
src/pystencils/nbackend/types/basic_types.py
+5
-5
5 additions, 5 deletions
src/pystencils/nbackend/types/basic_types.py
with
6 additions
and
6 deletions
src/pystencils/nbackend/jit/cpu_extension_module.py
+
1
−
1
View file @
d3a4ce73
...
@@ -199,7 +199,7 @@ if( !kwargs || !PyDict_Check(kwargs) ) {{
...
@@ -199,7 +199,7 @@ if( !kwargs || !PyDict_Check(kwargs) ) {{
f
"
Don
'
t know how to cast Python objects to
{
dtype
}
"
f
"
Don
'
t know how to cast Python objects to
{
dtype
}
"
)
)
def
_type_char
(
self
,
dtype
:
Ps
Scalar
Type
)
->
str
|
None
:
def
_type_char
(
self
,
dtype
:
Ps
Abstract
Type
)
->
str
|
None
:
if
isinstance
(
if
isinstance
(
dtype
,
(
PsUnsignedIntegerType
,
PsSignedIntegerType
,
PsIeeeFloatType
)
dtype
,
(
PsUnsignedIntegerType
,
PsSignedIntegerType
,
PsIeeeFloatType
)
):
):
...
...
This diff is collapsed.
Click to expand it.
src/pystencils/nbackend/types/basic_types.py
+
5
−
5
View file @
d3a4ce73
...
@@ -40,6 +40,11 @@ class PsAbstractType(ABC):
...
@@ -40,6 +40,11 @@ class PsAbstractType(ABC):
def
required_headers
(
self
)
->
set
[
str
]:
def
required_headers
(
self
)
->
set
[
str
]:
"""
The set of header files required when this type occurs in generated code.
"""
"""
The set of header files required when this type occurs in generated code.
"""
return
set
()
return
set
()
@property
def
itemsize
(
self
)
->
int
|
None
:
"""
If this type has a valid in-memory size, return that size.
"""
return
None
# -------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------
# Internal virtual operations
# Internal virtual operations
...
@@ -203,11 +208,6 @@ class PsScalarType(PsNumericType, ABC):
...
@@ -203,11 +208,6 @@ class PsScalarType(PsNumericType, ABC):
def
is_float
(
self
)
->
bool
:
def
is_float
(
self
)
->
bool
:
return
isinstance
(
self
,
PsIeeeFloatType
)
return
isinstance
(
self
,
PsIeeeFloatType
)
@property
@abstractmethod
def
itemsize
(
self
)
->
int
:
"""
Size of this type
'
s elements in bytes.
"""
class
PsIntegerType
(
PsScalarType
,
ABC
):
class
PsIntegerType
(
PsScalarType
,
ABC
):
"""
Class to model signed and unsigned integer types.
"""
Class to model signed and unsigned integer types.
...
...
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