github.com/gonum/lapack@v0.0.0-20181123203213-e4cdc5a0bff9/internal/testdata/netlib/netlib.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 netlib 6 7 // void dlahr2_(int* n, int* k, int* nb, double* a, int* lda, double* tau, double* t, int* ldt, double* y, int* ldy); 8 // 9 // void dlaqr5_(int* wantt, int* wantz, int* kacc22, int* n, int* ktop, int* kbot, int* nshfts, 10 // double* sr, double* si, double* h, int* ldh, int* iloz, int* ihiz, 11 // double* z, int* ldz, double* v, int* ldv, double* u, int* ldu, 12 // int* nv, double* wv, int* ldwv, int* nh, double* wh, int* ldwh); 13 import "C" 14 15 func Dlahr2(n, k, nb int, a []float64, lda int, tau, t []float64, ldt int, y []float64, ldy int) { 16 func() { 17 n := C.int(n) 18 k := C.int(k) 19 nb := C.int(nb) 20 lda := C.int(lda) 21 ldt := C.int(ldt) 22 ldy := C.int(ldy) 23 C.dlahr2_((*C.int)(&n), (*C.int)(&k), (*C.int)(&nb), 24 (*C.double)(&a[0]), (*C.int)(&lda), 25 (*C.double)(&tau[0]), 26 (*C.double)(&t[0]), (*C.int)(&ldt), 27 (*C.double)(&y[0]), (*C.int)(&ldy)) 28 }() 29 } 30 31 func Dlaqr5(wantt, wantz bool, kacc22 int, n, ktop, kbot int, nshfts int, sr, si []float64, h []float64, 32 ldh int, iloz, ihiz int, z []float64, ldz int, v []float64, ldv int, 33 u []float64, ldu int, nh int, wh []float64, ldwh int, nv int, wv []float64, ldwv int) { 34 func() { 35 wt := C.int(0) 36 if wantt { 37 wt = 1 38 } 39 wz := C.int(0) 40 if wantz { 41 wz = 1 42 } 43 kacc22 := C.int(kacc22) 44 n := C.int(n) 45 ktop := C.int(ktop) 46 kbot := C.int(kbot) 47 nshfts := C.int(nshfts) 48 ldh := C.int(ldh) 49 iloz := C.int(iloz) 50 ihiz := C.int(ihiz) 51 ldz := C.int(ldz) 52 ldv := C.int(ldv) 53 ldu := C.int(ldu) 54 nh := C.int(nh) 55 ldwh := C.int(ldwh) 56 nv := C.int(nv) 57 ldwv := C.int(ldwv) 58 C.dlaqr5_((*C.int)(&wt), (*C.int)(&wz), (*C.int)(&kacc22), 59 (*C.int)(&n), (*C.int)(&ktop), (*C.int)(&kbot), 60 (*C.int)(&nshfts), (*C.double)(&sr[0]), (*C.double)(&si[0]), 61 (*C.double)(&h[0]), (*C.int)(&ldh), 62 (*C.int)(&iloz), (*C.int)(&ihiz), (*C.double)(&z[0]), (*C.int)(&ldz), 63 (*C.double)(&v[0]), (*C.int)(&ldv), 64 (*C.double)(&u[0]), (*C.int)(&ldu), 65 (*C.int)(&nh), (*C.double)(&wh[0]), (*C.int)(&ldwh), 66 (*C.int)(&nv), (*C.double)(&wv[0]), (*C.int)(&ldwv)) 67 }() 68 }