{"action":"created","comment":{"url":"https://api.github.com/repos/gonum/lapack/pulls/comments/98128676","pull_request_review_id":18762115,"id":98128676,"diff_hunk":"@@ -108,6 +111,65 @@ type Implementation struct{}\n \n var _ lapack.Float64 = Implementation{}\n \n+// Dgeqp3 computes a QR factorization with column pivoting of the\n+// m×n matrix A: A*P = Q*R using Level 3 BLAS.\n+//\n+// The matrix Q is represented as a product of elementary reflectors\n+//  Q = H_0 H_1 . . . H_k-1, where k = min(m,n).\n+// Each H[i] has the form\n+//  H[i] = I - tau * v * v^T\n+// where tau is a real vector, and v is a real/complex vector\n+// with v[0:i-1] = 0 and v[i] = 1; v[i:m] is stored on exit in\n+// A[i:m, i], and tau in tau[i].\n+//\n+// jpvt specifies a column pivot to be applied to A. If\n+// jpvt[j] is at least zero, the jth column of A is permuted\n+// to the front of A*P (a leading column), otherwise the jth\n+// column of A is a free column. On return, jpvt holds the\n+// permutation that was applied; if jpvt[j] == k, then the jth\n+// column of A*P was the the kth column of A.\n+// jpvt must have length n or Dgeqp3 will panic.\n+//\n+// On exit tau holds the scalar factors of the elementary reflectors.\n+// It must have length n, otherwise Dgeqp3 will panic.\n+//\n+// work must have length max(1, lwork). otherwise Dgeqp3 will panic.\n+// work must have length at least max(1,lwork), and lwork must be at least\n+// 3*n+1. For optimal performance lwork must be at least 2*n+(n+1)*nb, where\n+// nb is the optimal blocksize.On return, work[0] will contain the optimal\n+// value of lwork.\n+//\n+// If lwork == -1, instead of performing Dgeqp3, only the optimal value of lwork\n+// will be stored in work[0].\n+//\n+// Dgeqp3 is an internal routine. It is exported for testing purposes.\n+func (impl Implementation) Dgeqp3(m, n int, a []float64, lda int, jpvt []int, tau, work []float64, lwork int) {\n+\tcheckMatrix(m, n, a, lda)\n+\tif len(jpvt) != n {\n+\t\tpanic(badIpiv)\n+\t}\n+\tif len(tau) < min(m, n) {\n+\t\tpanic(badTau)\n+\t}\n+\tif len(work) < max(1, lwork) {\n+\t\tpanic(badWork)\n+\t}\n+\n+\tjpvt32 := make([]int32, len(jpvt))\n+\tfor i, v := range jpvt {\n+\t\tif v+1 != int(int32(v+1)) {\n+\t\t\tpanic(\"lapack: jpvt element out of range\")\n+\t\t}\n+\t\tjpvt32[i] = int32(v + 1)","path":"cgo/lapack.go","position":68,"original_position":70,"commit_id":"c2b6a3e91ed46115d315bc7c9ed9f4db2c8a30d5","original_commit_id":"1eca835cda2c9b37f820805cbe717443d2f3d4c6","user":{"login":"kortschak","id":275221,"avatar_url":"https://avatars.githubusercontent.com/u/275221?v=3","gravatar_id":"","url":"https://api.github.com/users/kortschak","html_url":"https://github.com/kortschak","followers_url":"https://api.github.com/users/kortschak/followers","following_url":"https://api.github.com/users/kortschak/following{/other_user}","gists_url":"https://api.github.com/users/kortschak/gists{/gist_id}","starred_url":"https://api.github.com/users/kortschak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kortschak/subscriptions","organizations_url":"https://api.github.com/users/kortschak/orgs","repos_url":"https://api.github.com/users/kortschak/repos","events_url":"https://api.github.com/users/kortschak/events{/privacy}","received_events_url":"https://api.github.com/users/kortschak/received_events","type":"User","site_admin":false},"body":"The only caller is dggsvp3 which explicitly sets elements that are free to 0. Do one, but do we just allow the runtime to panic, or explicitly check and panic ourselves?","created_at":"2017-01-27T01:10:31Z","updated_at":"2017-01-27T01:10:31Z","html_url":"https://github.com/gonum/lapack/pull/224#discussion_r98128676","pull_request_url":"https://api.github.com/repos/gonum/lapack/pulls/224","_links":{"self":{"href":"https://api.github.com/repos/gonum/lapack/pulls/comments/98128676"},"html":{"href":"https://github.com/gonum/lapack/pull/224#discussion_r98128676"},"pull_request":{"href":"https://api.github.com/repos/gonum/lapack/pulls/224"}}},"pull_request":{"url":"https://api.github.com/repos/gonum/lapack/pulls/224","id":102660930,"html_url":"https://github.com/gonum/lapack/pull/224","diff_url":"https://github.com/gonum/lapack/pull/224.diff","patch_url":"https://github.com/gonum/lapack/pull/224.patch","issue_url":"https://api.github.com/repos/gonum/lapack/issues/224","number":224,"state":"open","locked":false,"title":"cgo,native: implement dgeqp3 and dependencies","user":{"login":"kortschak","id":275221,"avatar_url":"https://avatars.githubusercontent.com/u/275221?v=3","gravatar_id":"","url":"https://api.github.com/users/kortschak","html_url":"https://github.com/kortschak","followers_url":"https://api.github.com/users/kortschak/followers","following_url":"https://api.github.com/users/kortschak/following{/other_user}","gists_url":"https://api.github.com/users/kortschak/gists{/gist_id}","starred_url":"https://api.github.com/users/kortschak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kortschak/subscriptions","organizations_url":"https://api.github.com/users/kortschak/orgs","repos_url":"https://api.github.com/users/kortschak/repos","events_url":"https://api.github.com/users/kortschak/events{/privacy}","received_events_url":"https://api.github.com/users/kortschak/received_events","type":"User","site_admin":false},"body":"@btracey @vladimir-ch Please take a look.\r\n\r\nDocumentation probably needs work and tests also.\r\n\r\nUpdates #218.","created_at":"2017-01-23T05:45:46Z","updated_at":"2017-01-27T01:10:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4e3af279e6907e52658e48371b79b50291569e4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/gonum/lapack/pulls/224/commits","review_comments_url":"https://api.github.com/repos/gonum/lapack/pulls/224/comments","review_comment_url":"https://api.github.com/repos/gonum/lapack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gonum/lapack/issues/224/comments","statuses_url":"https://api.github.com/repos/gonum/lapack/statuses/c2b6a3e91ed46115d315bc7c9ed9f4db2c8a30d5","head":{"label":"gonum:dgeqp3","ref":"dgeqp3","sha":"c2b6a3e91ed46115d315bc7c9ed9f4db2c8a30d5","user":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"repo":{"id":20473913,"name":"lapack","full_name":"gonum/lapack","owner":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gonum/lapack","description":"A LAPACK implementation for Go","fork":false,"url":"https://api.github.com/repos/gonum/lapack","forks_url":"https://api.github.com/repos/gonum/lapack/forks","keys_url":"https://api.github.com/repos/gonum/lapack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gonum/lapack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gonum/lapack/teams","hooks_url":"https://api.github.com/repos/gonum/lapack/hooks","issue_events_url":"https://api.github.com/repos/gonum/lapack/issues/events{/number}","events_url":"https://api.github.com/repos/gonum/lapack/events","assignees_url":"https://api.github.com/repos/gonum/lapack/assignees{/user}","branches_url":"https://api.github.com/repos/gonum/lapack/branches{/branch}","tags_url":"https://api.github.com/repos/gonum/lapack/tags","blobs_url":"https://api.github.com/repos/gonum/lapack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gonum/lapack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gonum/lapack/git/refs{/sha}","trees_url":"https://api.github.com/repos/gonum/lapack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gonum/lapack/statuses/{sha}","languages_url":"https://api.github.com/repos/gonum/lapack/languages","stargazers_url":"https://api.github.com/repos/gonum/lapack/stargazers","contributors_url":"https://api.github.com/repos/gonum/lapack/contributors","subscribers_url":"https://api.github.com/repos/gonum/lapack/subscribers","subscription_url":"https://api.github.com/repos/gonum/lapack/subscription","commits_url":"https://api.github.com/repos/gonum/lapack/commits{/sha}","git_commits_url":"https://api.github.com/repos/gonum/lapack/git/commits{/sha}","comments_url":"https://api.github.com/repos/gonum/lapack/comments{/number}","issue_comment_url":"https://api.github.com/repos/gonum/lapack/issues/comments{/number}","contents_url":"https://api.github.com/repos/gonum/lapack/contents/{+path}","compare_url":"https://api.github.com/repos/gonum/lapack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gonum/lapack/merges","archive_url":"https://api.github.com/repos/gonum/lapack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gonum/lapack/downloads","issues_url":"https://api.github.com/repos/gonum/lapack/issues{/number}","pulls_url":"https://api.github.com/repos/gonum/lapack/pulls{/number}","milestones_url":"https://api.github.com/repos/gonum/lapack/milestones{/number}","notifications_url":"https://api.github.com/repos/gonum/lapack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gonum/lapack/labels{/name}","releases_url":"https://api.github.com/repos/gonum/lapack/releases{/id}","deployments_url":"https://api.github.com/repos/gonum/lapack/deployments","created_at":"2014-06-04T07:18:07Z","updated_at":"2017-01-22T05:14:32Z","pushed_at":"2017-01-27T00:17:52Z","git_url":"git://github.com/gonum/lapack.git","ssh_url":"git@github.com:gonum/lapack.git","clone_url":"https://github.com/gonum/lapack.git","svn_url":"https://github.com/gonum/lapack","homepage":"","size":4494,"stargazers_count":58,"watchers_count":58,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":23,"forks":6,"open_issues":23,"watchers":58,"default_branch":"master"}},"base":{"label":"gonum:master","ref":"master","sha":"e8ffdb21705a5e9bad9ac4222e1154879683f2bc","user":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"repo":{"id":20473913,"name":"lapack","full_name":"gonum/lapack","owner":{"login":"gonum","id":3771091,"avatar_url":"https://avatars.githubusercontent.com/u/3771091?v=3","gravatar_id":"","url":"https://api.github.com/users/gonum","html_url":"https://github.com/gonum","followers_url":"https://api.github.com/users/gonum/followers","following_url":"https://api.github.com/users/gonum/following{/other_user}","gists_url":"https://api.github.com/users/gonum/gists{/gist_id}","starred_url":"https://api.github.com/users/gonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonum/subscriptions","organizations_url":"https://api.github.com/users/gonum/orgs","repos_url":"https://api.github.com/users/gonum/repos","events_url":"https://api.github.com/users/gonum/events{/privacy}","received_events_url":"https://api.github.com/users/gonum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gonum/lapack","description":"A LAPACK implementation for Go","fork":false,"url":"https://api.github.com/repos/gonum/lapack","forks_url":"https://api.github.com/repos/gonum/lapack/forks","keys_url":"https://api.github.com/repos/gonum/lapack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gonum/lapack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gonum/lapack/teams","hooks_url":"https://api.github.com/repos/gonum/lapack/hooks","issue_events_url":"https://api.github.com/repos/gonum/lapack/issues/events{/number}","events_url":"https://api.github.com/repos/gonum/lapack/events","assignees_url":"https://api.github.com/repos/gonum/lapack/assignees{/user}","branches_url":"https://api.github.com/repos/gonum/lapack/branches{/branch}","tags_url":"https://api.github.com/repos/gonum/lapack/tags","blobs_url":"https://api.github.com/repos/gonum/lapack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gonum/lapack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gonum/lapack/git/refs{/sha}","trees_url":"https://api.github.com/repos/gonum/lapack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gonum/lapack/statuses/{sha}","languages_url":"https://api.github.com/repos/gonum/lapack/languages","stargazers_url":"https://api.github.com/repos/gonum/lapack/stargazers","contributors_url":"https://api.github.com/repos/gonum/lapack/contributors","subscribers_url":"https://api.github.com/repos/gonum/lapack/subscribers","subscription_url":"https://api.github.com/repos/gonum/lapack/subscription","commits_url":"https://api.github.com/repos/gonum/lapack/commits{/sha}","git_commits_url":"https://api.github.com/repos/gonum/lapack/git/commits{/sha}","comments_url":"https://api.github.com/repos/gonum/lapack/comments{/number}","issue_comment_url":"https://api.github.com/repos/gonum/lapack/issues/comments{/number}","contents_url":"https://api.github.com/repos/gonum/lapack/contents/{+path}","compare_url":"https://api.github.com/repos/gonum/lapack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gonum/lapack/merges","archive_url":"https://api.github.com/repos/gonum/lapack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gonum/lapack/downloads","issues_url":"https://api.github.com/repos/gonum/lapack/issues{/number}","pulls_url":"https://api.github.com/repos/gonum/lapack/pulls{/number}","milestones_url":"https://api.github.com/repos/gonum/lapack/milestones{/number}","notifications_url":"https://api.github.com/repos/gonum/lapack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gonum/lapack/labels{/name}","releases_url":"https://api.github.com/repos/gonum/lapack/releases{/id}","deployments_url":"https://api.github.com/repos/gonum/lapack/deployments","created_at":"2014-06-04T07:18:07Z","updated_at":"2017-01-22T05:14:32Z","pushed_at":"2017-01-27T00:17:52Z","git_url":"git://github.com/gonum/lapack.git","ssh_url":"git@github.com:gonum/lapack.git","clone_url":"https://github.com/gonum/lapack.git","svn_url":"https://github.com/gonum/lapack","homepage":"","size":4494,"stargazers_count":58,"watchers_count":58,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":23,"forks":6,"open_issues":23,"watchers":58,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gonum/lapack/pulls/224"},"html":{"href":"https://github.com/gonum/lapack/pull/224"},"issue":{"href":"https://api.github.com/repos/gonum/lapack/issues/224"},"comments":{"href":"https://api.github.com/repos/gonum/lapack/issues/224/comments"},"review_comments":{"href":"https://api.github.com/repos/gonum/lapack/pulls/224/comments"},"review_comment":{"href":"https://api.github.com/repos/gonum/lapack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gonum/lapack/pulls/224/commits"},"statuses":{"href":"https://api.github.com/repos/gonum/lapack/statuses/c2b6a3e91ed46115d315bc7c9ed9f4db2c8a30d5"}}}}
{"actor":{"display_login":"kortschak"}}