Commit 73372c6d by Philipp Adolf

Format autogenerated code

parent 1c5d3401
...@@ -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)
} }
...@@ -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 {
......
...@@ -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
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment