Documentation

Overview

    Package f32 provides float32 vector primitives.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func AxpyInc

    func AxpyInc(alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr)

      AxpyInc is

      for i := 0; i < int(n); i++ {
      	y[iy] += alpha * x[ix]
      	ix += incX
      	iy += incY
      }
      

      func AxpyIncTo

      func AxpyIncTo(dst []float32, incDst, idst uintptr, alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr)

        AxpyIncTo is

        for i := 0; i < int(n); i++ {
        	dst[idst] = alpha*x[ix] + y[iy]
        	ix += incX
        	iy += incY
        	idst += incDst
        }
        

        func AxpyUnitary

        func AxpyUnitary(alpha float32, x, y []float32)

          AxpyUnitary is

          for i, v := range x {
          	y[i] += alpha * v
          }
          

          func AxpyUnitaryTo

          func AxpyUnitaryTo(dst []float32, alpha float32, x, y []float32)

            AxpyUnitaryTo is

            for i, v := range x {
            	dst[i] = alpha*v + y[i]
            }
            

            func DdotInc

            func DdotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float64)

              DdotInc is

              for i := 0; i < int(n); i++ {
              	sum += float64(y[iy]) * float64(x[ix])
              	ix += incX
              	iy += incY
              }
              return
              

              func DdotUnitary

              func DdotUnitary(x, y []float32) (sum float64)

                DdotUnitary is

                for i, v := range x {
                	sum += float64(y[i]) * float64(v)
                }
                return
                

                func DotInc

                func DotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float32)

                  DotInc is

                  for i := 0; i < int(n); i++ {
                  	sum += y[iy] * x[ix]
                  	ix += incX
                  	iy += incY
                  }
                  return sum
                  

                  func DotUnitary

                  func DotUnitary(x, y []float32) (sum float32)

                    DotUnitary is

                    for i, v := range x {
                    	sum += y[i] * v
                    }
                    return sum
                    

                    func Ger

                    func Ger(m, n uintptr, alpha float32,
                    	x []float32, incX uintptr,
                    	y []float32, incY uintptr,
                    	a []float32, lda uintptr)

                      Ger performs the rank-one operation

                      A += alpha * x * yᵀ
                      

                      where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar.

                      func L2DistanceUnitary

                      func L2DistanceUnitary(x, y []float32) (sum float32)

                        L2DistanceUnitary is the L2 norm of x-y.

                        func L2NormInc

                        func L2NormInc(x []float32, n, incX uintptr) (sum float32)

                          L2NormInc is the level 2 norm of x.

                          func L2NormUnitary

                          func L2NormUnitary(x []float32) (sum float32)

                            L2NormUnitary is the level 2 norm of x.

                            func ScalInc

                            func ScalInc(alpha float32, x []float32, n, incX uintptr)

                              ScalInc is

                              var ix uintptr
                              for i := 0; i < int(n); i++ {
                              	x[ix] *= alpha
                              	ix += incX
                              }
                              

                              func ScalIncTo

                              func ScalIncTo(dst []float32, incDst uintptr, alpha float32, x []float32, n, incX uintptr)

                                ScalIncTo is

                                var idst, ix uintptr
                                for i := 0; i < int(n); i++ {
                                	dst[idst] = alpha * x[ix]
                                	ix += incX
                                	idst += incDst
                                }
                                

                                func ScalUnitary

                                func ScalUnitary(alpha float32, x []float32)

                                  ScalUnitary is

                                  for i := range x {
                                  	x[i] *= alpha
                                  }
                                  

                                  func ScalUnitaryTo

                                  func ScalUnitaryTo(dst []float32, alpha float32, x []float32)

                                    ScalUnitaryTo is

                                    for i, v := range x {
                                    	dst[i] = alpha * v
                                    }
                                    

                                    func Sum

                                    func Sum(x []float32) float32

                                      Sum is

                                       var sum float32
                                       for _, v := range x {
                                      		sum += v
                                       }
                                       return sum
                                      

                                      Types

                                      This section is empty.