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
73372c6d
Commit
73372c6d
authored
Feb 26, 2017
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Format autogenerated code
parent
1c5d3401
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
16 deletions
+4
-16
deviceinfo.go
deviceinfo.go
+1
-13
infogen.go
infogen.go
+2
-1
platforminfo.go
platforminfo.go
+1
-2
No files found.
deviceinfo.go
View file @
73372c6d
...
@@ -136,22 +136,11 @@ func (d Device) getInfoQueueProperties(name string, id C.cl_device_info) (Comman
...
@@ -136,22 +136,11 @@ func (d Device) getInfoQueueProperties(name string, id C.cl_device_info) (Comman
return
fromCLProperties
(
buf
),
nil
return
fromCLProperties
(
buf
),
nil
}
}
func
(
d
Device
)
dummyUseStrings
()
([]
string
)
{
func
(
d
Device
)
dummyUseStrings
()
[]
string
{
// a dummy function so that strings is not unused even if template space-delim is not used
// a dummy function so that strings is not unused even if template space-delim is not used
return
strings
.
Split
(
""
,
""
)
return
strings
.
Split
(
""
,
""
)
}
}
func
(
d
Device
)
Type
()
(
DeviceType
,
error
)
{
func
(
d
Device
)
Type
()
(
DeviceType
,
error
)
{
return
d
.
getInfoType
(
"Type"
,
C
.
CL_DEVICE_TYPE
)
return
d
.
getInfoType
(
"Type"
,
C
.
CL_DEVICE_TYPE
)
}
}
...
@@ -391,4 +380,3 @@ func (d Device) Profile() (string, error) {
...
@@ -391,4 +380,3 @@ func (d Device) Profile() (string, error) {
func
(
d
Device
)
Version
()
(
string
,
error
)
{
func
(
d
Device
)
Version
()
(
string
,
error
)
{
return
d
.
getInfoString
(
"Version"
,
C
.
CL_DEVICE_VERSION
)
return
d
.
getInfoString
(
"Version"
,
C
.
CL_DEVICE_VERSION
)
}
}
infogen.go
View file @
73372c6d
...
@@ -12,6 +12,7 @@ package main
...
@@ -12,6 +12,7 @@ package main
import
"C"
import
"C"
import
(
import
(
"bytes"
"bytes"
"go/format"
"io/ioutil"
"io/ioutil"
"log"
"log"
"os"
"os"
...
@@ -116,7 +117,7 @@ func generate(tmpl *template.Template, data interface{}) ([]byte, error) {
...
@@ -116,7 +117,7 @@ func generate(tmpl *template.Template, data interface{}) ([]byte, error) {
return
nil
,
err
return
nil
,
err
}
}
return
buf
.
Bytes
(),
nil
return
format
.
Source
(
buf
.
Bytes
())
}
}
func
writeBytes
(
filename
string
,
data
[]
byte
)
error
{
func
writeBytes
(
filename
string
,
data
[]
byte
)
error
{
...
...
platforminfo.go
View file @
73372c6d
...
@@ -31,7 +31,7 @@ func (p Platform) getInfoString(name string, id C.cl_platform_info) (string, err
...
@@ -31,7 +31,7 @@ func (p Platform) getInfoString(name string, id C.cl_platform_info) (string, err
return
C
.
GoString
(
&
buf
[
0
]),
nil
return
C
.
GoString
(
&
buf
[
0
]),
nil
}
}
func
(
p
Platform
)
dummyUseStrings
()
([]
string
)
{
func
(
p
Platform
)
dummyUseStrings
()
[]
string
{
// a dummy function so that strings is not unused even if template space-delim is not used
// a dummy function so that strings is not unused even if template space-delim is not used
return
strings
.
Split
(
""
,
""
)
return
strings
.
Split
(
""
,
""
)
}
}
...
@@ -59,4 +59,3 @@ func (p Platform) Extension() ([]string, error) {
...
@@ -59,4 +59,3 @@ func (p Platform) Extension() ([]string, error) {
}
}
return
strings
.
Split
(
str
,
" "
),
nil
return
strings
.
Split
(
str
,
" "
),
nil
}
}
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