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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
pyopencl
Commits
81383aa0
Commit
81383aa0
authored
12 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Add version markers to the parallel algorithms.
parent
ec2a4c6f
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/algorithm.py
+10
-0
10 additions, 0 deletions
pyopencl/algorithm.py
with
10 additions
and
0 deletions
pyopencl/algorithm.py
+
10
−
0
View file @
81383aa0
...
@@ -63,6 +63,8 @@ def copy_if(ary, predicate, extra_args=[], queue=None, preamble=""):
...
@@ -63,6 +63,8 @@ def copy_if(ary, predicate, extra_args=[], queue=None, preamble=""):
:returns: a tuple *(out, count)* where *out* is the output array and *count*
:returns: a tuple *(out, count)* where *out* is the output array and *count*
is an on-device scalar (fetch to host with `count.get()`) indicating
is an on-device scalar (fetch to host with `count.get()`) indicating
how many elements satisfied *predicate*.
how many elements satisfied *predicate*.
.. versionadded:: 2012.2
"""
"""
if
len
(
ary
)
>
np
.
iinfo
(
np
.
int32
).
max
:
if
len
(
ary
)
>
np
.
iinfo
(
np
.
int32
).
max
:
scan_dtype
=
np
.
int64
scan_dtype
=
np
.
int64
...
@@ -96,6 +98,8 @@ def remove_if(ary, predicate, extra_args=[], queue=None, preamble=""):
...
@@ -96,6 +98,8 @@ def remove_if(ary, predicate, extra_args=[], queue=None, preamble=""):
:returns: a tuple *(out, count)* where *out* is the output array and *count*
:returns: a tuple *(out, count)* where *out* is the output array and *count*
is an on-device scalar (fetch to host with `count.get()`) indicating
is an on-device scalar (fetch to host with `count.get()`) indicating
how many elements did not satisfy *predicate*.
how many elements did not satisfy *predicate*.
.. versionadded:: 2012.2
"""
"""
return
copy_if
(
ary
,
"
!(%s)
"
%
predicate
,
extra_args
=
extra_args
,
queue
=
queue
,
return
copy_if
(
ary
,
"
!(%s)
"
%
predicate
,
extra_args
=
extra_args
,
queue
=
queue
,
preamble
=
preamble
)
preamble
=
preamble
)
...
@@ -132,6 +136,8 @@ def partition(ary, predicate, extra_args=[], queue=None, preamble=""):
...
@@ -132,6 +136,8 @@ def partition(ary, predicate, extra_args=[], queue=None, preamble=""):
:returns: a tuple *(out_true, out_false, count)* where *count*
:returns: a tuple *(out_true, out_false, count)* where *count*
is an on-device scalar (fetch to host with `count.get()`) indicating
is an on-device scalar (fetch to host with `count.get()`) indicating
how many elements satisfied the predicate.
how many elements satisfied the predicate.
.. versionadded:: 2012.2
"""
"""
if
len
(
ary
)
>
np
.
iinfo
(
np
.
uint32
).
max
:
if
len
(
ary
)
>
np
.
iinfo
(
np
.
uint32
).
max
:
scan_dtype
=
np
.
uint64
scan_dtype
=
np
.
uint64
...
@@ -188,6 +194,8 @@ def unique(ary, is_equal_expr="a == b", extra_args=[], queue=None, preamble=""):
...
@@ -188,6 +194,8 @@ def unique(ary, is_equal_expr="a == b", extra_args=[], queue=None, preamble=""):
:returns: a tuple *(out, count)* where *out* is the output array and *count*
:returns: a tuple *(out, count)* where *out* is the output array and *count*
is an on-device scalar (fetch to host with `count.get()`) indicating
is an on-device scalar (fetch to host with `count.get()`) indicating
how many elements satisfied the predicate.
how many elements satisfied the predicate.
.. versionadded:: 2012.2
"""
"""
if
len
(
ary
)
>
np
.
iinfo
(
np
.
uint32
).
max
:
if
len
(
ary
)
>
np
.
iinfo
(
np
.
uint32
).
max
:
...
@@ -337,6 +345,8 @@ RADIX_SORT_OUTPUT_STMT_TPL = Template(r"""//CL//
...
@@ -337,6 +345,8 @@ RADIX_SORT_OUTPUT_STMT_TPL = Template(r"""//CL//
class
RadixSort
(
object
):
class
RadixSort
(
object
):
"""
Provides a general `radix sort <https://en.wikipedia.org/wiki/Radix_sort>`_
"""
Provides a general `radix sort <https://en.wikipedia.org/wiki/Radix_sort>`_
on the compute device.
on the compute device.
.. versionadded:: 2012.2
"""
"""
def
__init__
(
self
,
context
,
arguments
,
key_expr
,
sort_arg_names
,
def
__init__
(
self
,
context
,
arguments
,
key_expr
,
sort_arg_names
,
bits_at_a_time
=
2
,
index_dtype
=
np
.
int32
,
key_dtype
=
np
.
uint32
,
bits_at_a_time
=
2
,
index_dtype
=
np
.
int32
,
key_dtype
=
np
.
uint32
,
...
...
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