func (t TriangularBand) From(a TriangularBandCols) {
	if t.N != a.N {
		panic("cblas64: mismatched dimension")
	}
	if t.K != a.K {
		panic("cblas64: mismatched bandwidth")
	}
	if a.Stride < a.K+1 {
		panic("cblas64: short stride for source")
	}
	if t.Stride < t.K+1 {
		panic("cblas64: short stride for destination")
	}
	if t.Uplo != a.Uplo {
		panic("cblas64: mismatched BLAS uplo")
	}
	if t.Diag != a.Diag {
		panic("cblas64: mismatched BLAS diag")
	}
	dst := Band{
		Rows: t.N, Cols: t.N,
		Stride: t.Stride,
		Data:   t.Data,
	}
	src := BandCols{
		Rows: a.N, Cols: a.N,
		Stride: a.Stride,
		Data:   a.Data,
	}
	switch a.Uplo {
	default:
		panic("cblas64: bad BLAS uplo")
	case blas.Upper:
		dst.KU = t.K
		src.KU = a.K
	case blas.Lower:
		dst.KL = t.K
		src.KL = a.K
	}
	dst.From(src)
}
From fills the receiver with elements from a. The receiver
must have the same dimensions, bandwidth and uplo as a and
have adequate backing data storage.
package cblas64
import "gonum.org/v1/gonum/blas"
type GeneralCols General
func (t GeneralCols) From(a General) {
	if t.Rows != a.Rows || t.Cols != a.Cols {
		panic("cblas64: mismatched dimension")
	}
	if len(t.Data) < (t.Cols-1)*t.Stride+t.Rows {
		panic("cblas64: short data slice")
	}
	for i := 0; i < a.Rows; i++ {
		for j, v := range a.Data[i*a.Stride : i*a.Stride+a.Cols] {
			t.Data[i+j*t.Stride] = v
		}
	}
}
func (t General) From(a GeneralCols) {
	if t.Rows != a.Rows || t.Cols != a.Cols {
		panic("cblas64: mismatched dimension")
	}
	if len(t.Data) < (t.Rows-1)*t.Stride+t.Cols {
		panic("cblas64: short data slice")
	}
	for j := 0; j < a.Cols; j++ {
		for i, v := range a.Data[j*a.Stride : j*a.Stride+a.Rows] {
			t.Data[i*t.Stride+j] = v
		}
	}
}
type TriangularCols Triangular
func (t TriangularCols) From(a Triangular) {
	if t.N != a.N {
		panic("cblas64: mismatched dimension")
	}
	if t.Uplo != a.Uplo {
		panic("cblas64: mismatched BLAS uplo")
	}
	if t.Diag != a.Diag {
		panic("cblas64: mismatched BLAS diag")
	}
	switch a.Uplo {
	default:
		panic("cblas64: bad BLAS uplo")
	case blas.Upper:
		for i := 0; i < a.N; i++ {
			for j := i; j < a.N; j++ {
				t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j]
			}
		}
	case blas.Lower:
		for i := 0; i < a.N; i++ {
			for j := 0; j <= i; j++ {
				t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j]
			}
		}
	case blas.All:
		for i := 0; i < a.N; i++ {
			for j := 0; j < a.N; j++ {
				t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j]
			}
		}
	}
}
func (t Triangular) From(a TriangularCols) {
	if t.N != a.N {
		panic("cblas64: mismatched dimension")
	}
	if t.Uplo != a.Uplo {
		panic("cblas64: mismatched BLAS uplo")
	}
	if t.Diag != a.Diag {
		panic("cblas64: mismatched BLAS diag")
	}
	switch a.Uplo {
	default:
		panic("cblas64: bad BLAS uplo")
	case blas.Upper:
		for i := 0; i < a.N; i++ {
			for j := i; j < a.N; j++ {
				t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride]
			}
		}
	case blas.Lower:
		for i := 0; i < a.N; i++ {
			for j := 0; j <= i; j++ {
				t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride]
			}
		}
	case blas.All:
		for i := 0; i < a.N; i++ {
			for j := 0; j < a.N; j++ {
				t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride]
			}
		}
	}
}
type BandCols Band
func (t BandCols) From(a Band) {
	if t.Rows != a.Rows || t.Cols != a.Cols {
		panic("cblas64: mismatched dimension")
	}
	if t.KL != a.KL || t.KU != a.KU {
		panic("cblas64: mismatched bandwidth")
	}
	if a.Stride < a.KL+a.KU+1 {
		panic("cblas64: short stride for source")
	}
	if t.Stride < t.KL+t.KU+1 {
		panic("cblas64: short stride for destination")
	}
	for i := 0; i < a.Rows; i++ {
		for j := max(0, i-a.KL); j < min(i+a.KU+1, a.Cols); j++ {
			t.Data[i+t.KU-j+j*t.Stride] = a.Data[j+a.KL-i+i*a.Stride]
		}
	}
}
func (t Band) From(a BandCols) {
	if t.Rows != a.Rows || t.Cols != a.Cols {
		panic("cblas64: mismatched dimension")
	}
	if t.KL != a.KL || t.KU != a.KU {
		panic("cblas64: mismatched bandwidth")
	}
	if a.Stride < a.KL+a.KU+1 {
		panic("cblas64: short stride for source")
	}
	if t.Stride < t.KL+t.KU+1 {
		panic("cblas64: short stride for destination")
	}
	for j := 0; j < a.Cols; j++ {
		for i := max(0, j-a.KU); i < min(j+a.KL+1, a.Rows); i++ {
			t.Data[j+a.KL-i+i*a.Stride] = a.Data[i+t.KU-j+j*t.Stride]
		}
	}
}
type TriangularBandCols TriangularBand
func (t TriangularBandCols) From(a TriangularBand) {
	if t.N != a.N {
		panic("cblas64: mismatched dimension")
	}
	if t.K != a.K {
		panic("cblas64: mismatched bandwidth")
	}
	if a.Stride < a.K+1 {
		panic("cblas64: short stride for source")
	}
	if t.Stride < t.K+1 {
		panic("cblas64: short stride for destination")
	}
	if t.Uplo != a.Uplo {
		panic("cblas64: mismatched BLAS uplo")
	}
	if t.Diag != a.Diag {
		panic("cblas64: mismatched BLAS diag")
	}
	dst := BandCols{
		Rows: t.N, Cols: t.N,
		Stride: t.Stride,
		Data:   t.Data,
	}
	src := Band{
		Rows: a.N, Cols: a.N,
		Stride: a.Stride,
		Data:   a.Data,
	}
	switch a.Uplo {
	default:
		panic("cblas64: bad BLAS uplo")
	case blas.Upper:
		dst.KU = t.K
		src.KU = a.K
	case blas.Lower:
		dst.KL = t.K
		src.KL = a.K
	}
	dst.From(src)
}