Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyopencl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexandru Fikl
pyopencl
Commits
9ef7ffa3
Commit
9ef7ffa3
authored
14 years ago
by
Stefan van der Walt
Browse files
Options
Downloads
Patches
Plain Diff
Fix _axpbz calling convention.
parent
86c199c9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyopencl/array.py
+6
-6
6 additions, 6 deletions
pyopencl/array.py
with
6 additions
and
6 deletions
pyopencl/array.py
+
6
−
6
View file @
9ef7ffa3
...
...
@@ -288,7 +288,7 @@ class Array(object):
return
self
else
:
result
=
self
.
_new_like_me
()
self
.
_axpbz
(
result
,
1
,
other
)
self
.
_axpbz
(
result
,
1
,
self
,
other
)
return
result
__radd__
=
__add__
...
...
@@ -306,7 +306,7 @@ class Array(object):
else
:
# create a new array for the result
result
=
self
.
_new_like_me
()
return
self
.
_axpbz
(
result
,
1
,
-
other
)
return
self
.
_axpbz
(
result
,
1
,
self
,
-
other
)
def
__rsub__
(
self
,
other
):
"""
Substracts an array by a scalar or an array::
...
...
@@ -315,7 +315,7 @@ class Array(object):
"""
# other must be a scalar
result
=
self
.
_new_like_me
()
return
self
.
_axpbz
(
result
,
-
1
,
other
)
return
self
.
_axpbz
(
result
,
-
1
,
self
,
other
)
def
__iadd__
(
self
,
other
):
self
.
_axpbyz
(
self
,
1
,
self
,
1
,
other
)
...
...
@@ -326,7 +326,7 @@ class Array(object):
def
__neg__
(
self
):
result
=
self
.
_new_like_me
()
return
self
.
_axpbz
(
result
,
-
1
,
self
)
return
self
.
_axpbz
(
result
,
-
1
,
self
,
0
)
def
__mul__
(
self
,
other
):
if
isinstance
(
other
,
Array
):
...
...
@@ -344,7 +344,7 @@ class Array(object):
return
result
def
__imul__
(
self
,
scalar
):
self
.
_axpbz
(
self
,
scalar
,
0
)
self
.
_axpbz
(
self
,
scalar
,
self
,
0
)
return
self
def
__div__
(
self
,
other
):
...
...
@@ -361,7 +361,7 @@ class Array(object):
else
:
# create a new array for the result
result
=
self
.
_new_like_me
()
self
.
_axpbz
(
result
,
1
/
other
,
0
)
self
.
_axpbz
(
result
,
1
/
other
,
self
,
0
)
return
result
__truediv__
=
__div__
...
...
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