Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
opencl
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mastersthesis-philipp
opencl
Commits
2e0bd273
Commit
2e0bd273
authored
Mar 01, 2017
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable setting kernel args
parent
5752ac88
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
README.md
README.md
+1
-1
kernel.go
kernel.go
+12
-0
No files found.
README.md
View file @
2e0bd273
...
...
@@ -32,7 +32,7 @@ It is mainly developed and tested on Linux and with Intel and Nvidia GPUs. It sh
-
[
]
querying program (build) info
-
[
]
kernel objects
-
[
x
]
creating and releasing kernels
-
[
]
setting arguments
-
[
x
]
setting arguments
-
[
]
querying kernel, work group and argument info
-
[
]
executing kernels
-
[
]
event objects
...
...
kernel.go
View file @
2e0bd273
...
...
@@ -37,3 +37,15 @@ func (k Kernel) Release() error {
}
return
nil
}
func
(
k
Kernel
)
SetArg
(
index
uint
,
size
uintptr
,
value
unsafe
.
Pointer
)
error
{
err
:=
C
.
clSetKernelArg
(
k
.
kernel
,
C
.
cl_uint
(
index
),
C
.
size_t
(
size
),
value
)
if
err
!=
C
.
CL_SUCCESS
{
return
fmt
.
Errorf
(
"error setting kernel argument: %d"
,
err
)
}
return
nil
}
func
(
k
Kernel
)
SetArgBuffer
(
index
uint
,
buffer
Memory
)
error
{
return
k
.
SetArg
(
index
,
unsafe
.
Sizeof
(
buffer
.
memory
),
unsafe
.
Pointer
(
&
buffer
.
memory
))
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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