Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

Commit

Permalink
native: run 'go generate'
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-ch committed Jan 15, 2016
1 parent 9e5d79a commit 6881005
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 5 additions & 9 deletions native/level1single.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,37 +602,33 @@ func (Implementation) Sscal(n int, alpha float32, x []float32, incX int) {
}
return
}
if incX > 0 && (n-1)*incX >= len(x) {
if (n-1)*incX >= len(x) {
panic(badX)
}
if n < 1 {
if n == 0 {
return
}
if n < 1 {
panic(negativeN)
}
panic(negativeN)
}
if alpha == 0 {
if incX == 1 {
x = x[:n]
for i := range x {
x[i] = 0
}
return
}
for ix := 0; ix < n*incX; ix += incX {
x[ix] = 0
}
return
}
if incX == 1 {
x = x[:n]
for i := range x {
x[i] *= alpha
}
asm.SscalUnitary(alpha, x[:n])
return
}
for ix := 0; ix < n*incX; ix += incX {
x[ix] *= alpha
}
return
}
2 changes: 2 additions & 0 deletions native/single_precision
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ cat level1double.go \
| gofmt -r 'asm.DaxpyUnitaryTo -> asm.SaxpyUnitaryTo' \
| gofmt -r 'asm.DdotInc -> asm.SdotInc' \
| gofmt -r 'asm.DdotUnitary -> asm.SdotUnitary' \
| gofmt -r 'asm.DscalUnitary -> asm.SscalUnitary' \
| gofmt -r 'asm.DscalInc -> asm.SscalInc' \
\
| sed -e "s_^\(func (Implementation) \)D\(.*\)\$_$WARNING\1S\2_" \
-e 's_^// D_// S_' \
Expand Down

0 comments on commit 6881005

Please sign in to comment.