gonum.org/v1/gonum@v0.14.0/internal/asm/c128/scal.go (about) 1 // Copyright ©2016 The Gonum Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package c128 6 7 // ScalUnitaryTo is 8 // 9 // for i, v := range x { 10 // dst[i] = alpha * v 11 // } 12 func ScalUnitaryTo(dst []complex128, alpha complex128, x []complex128) { 13 for i, v := range x { 14 dst[i] = alpha * v 15 } 16 } 17 18 // ScalIncTo is 19 // 20 // var idst, ix uintptr 21 // for i := 0; i < int(n); i++ { 22 // dst[idst] = alpha * x[ix] 23 // ix += incX 24 // idst += incDst 25 // } 26 func ScalIncTo(dst []complex128, incDst uintptr, alpha complex128, x []complex128, n, incX uintptr) { 27 var idst, ix uintptr 28 for i := 0; i < int(n); i++ { 29 dst[idst] = alpha * x[ix] 30 ix += incX 31 idst += incDst 32 } 33 }