{"action":"created","comment":{"url":"https://api.github.com/repos/gonum/lapack/pulls/comments/36141172","id":36141172,"diff_hunk":"@@ -77,6 +77,71 @@ func (impl Implementation) Dpotrf(ul blas.Uplo, n int, a []float64, lda int) (ok\n \treturn clapack.Dpotrf(ul, n, a, lda)\n }\n \n+// Dgeqr2 computes a QR factorization of the m×n matrix A.\n+//\n+// In a QR factorization, Q is an m×m orthonormal matrix, and R is an\n+// upper triangular m×n matrix.\n+//\n+// During Dgeqr2, a is modified to contain the information to construct Q and R.\n+// The upper triangle of a contains the matrix R. The lower triangular elements\n+// (not including the diagonal) contain the elementary reflectors. Tau is modified\n+// to contain the reflector scales. Tau must have length at least k = min(m,n), and\n+// this function will panic otherwise.\n+//\n+// The ith elementary reflector can be explicitly constructed by first extracting\n+// the\n+//  v[j] = 0           j < i\n+//  v[j] = i           j == i\n+//  v[j] = a[i*lda+j]  j > i\n+// and computing h_i = I - tau[i] * v * v^T.\n+//\n+// The orthonormal matrix Q can be constucted from a product of these elementary\n+// reflectors, Q = H_1*H_2 ... H_k, where k = min(m,n).\n+//\n+// Work is temporary storage of length at least n and this function will panic otherwise.\n+func (impl Implementation) Dgeqr2(m, n int, a []float64, lda int, tau, work []float64) {\n+\t// TODO(btracey): This is oriented such that columns of a are eliminated.\n+\t// This likely could be re-arranged to take better advantage of row-major\n+\t// storage.\n+\tcheckMatrix(m, n, a, lda)\n+\tif len(work) < n {\n+\t\tpanic(badWork)\n+\t}\n+\tk := min(m, n)\n+\tif len(tau) < k {\n+\t\tpanic(badTau)\n+\t}\n+\tclapack.Dgeqr2(m, n, a, lda, tau)\n+}\n+\n+// Dgeqrf computes the QR factorization of the m×n matrix A using a blocked\n+// algorithm. Please see the documentation for Dgeqr2 for a description of the","path":"cgo/lapack.go","position":42,"original_position":42,"commit_id":"0331cab04a2fdad0a210263069fa143f6f7d038f","original_commit_id":"0331cab04a2fdad0a210263069fa143f6f7d038f","user":{"login":"btracey","id":3680859,"avatar_url":"https://avatars.githubusercontent.com/u/3680859?v=3","gravatar_id":"","url":"https://api.github.com/users/btracey","html_url":"https://github.com/btracey","followers_url":"https://api.github.com/users/btracey/followers","following_url":"https://api.github.com/users/btracey/following{/other_user}","gists_url":"https://api.github.com/users/btracey/gists{/gist_id}","starred_url":"https://api.github.com/users/btracey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btracey/subscriptions","organizations_url":"https://api.github.com/users/btracey/orgs","repos_url":"https://api.github.com/users/btracey/repos","events_url":"https://api.github.com/users/btracey/events{/privacy}","received_events_url":"https://api.github.com/users/btracey/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2015-08-03T22:56:45Z","updated_at":"2015-08-03T22:56:45Z","html_url":"https://github.com/gonum/lapack/pull/27#discussion_r36141172","pull_request_url":"https://api.github.com/repos/gonum/lapack/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/gonum/lapack/pulls/comments/36141172"},"html":{"href":"https://github.com/gonum/lapack/pull/27#discussion_r36141172"},"pull_request":{"href":"https://api.github.com/repos/gonum/lapack/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/gonum/lapack/pulls/27","id":41484243,"html_url":"https://github.com/gonum/lapack/pull/27","diff_url":"https://github.com/gonum/lapack/pull/27.diff","patch_url":"https://github.com/gonum/lapack/pull/27.patch","issue_url":"https://api.github.com/repos/gonum/lapack/issues/27","number":27,"state":"open","locked":false,"title":"Add QR factorization to lapack64 interface.","user":{"login":"btracey","id":3680859,"avatar_url":"https://avatars.githubusercontent.com/u/3680859?v=3","gravatar_id":"","url":"https://api.github.com/users/btracey","html_url":"https://github.com/btracey","followers_url":"https://api.github.com/users/btracey/followers","following_url":"https://api.github.com/users/btracey/following{/other_user}","gists_url":"https://api.github.com/users/btracey/gists{/gist_id}","starred_url":"https://api.github.com/users/btracey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btracey/subscriptions","organizations_url":"https://api.github.com/users/btracey/orgs","repos_url":"https://api.github.com/users/btracey/repos","events_url":"https://api.github.com/users/btracey/events{/privacy}","received_events_url":"https://api.github.com/users/btracey/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-03T16:22:27Z","updated_at":"2015-08-03T22:56:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a67b6d075d6134f4d8fa5bbbf2ce21d2be157bc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gonum/lapack/pulls/27/commits","review_comments_url":"https://api.github.com/repos/gonum/lapack/pulls/27/comments","review_comment_url":"https://api.github.com/repos/gonum/lapack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gonum/lapack/issues/27/comments","statuses_url":"https://api.github.com/repos/gonum/lapack/statuses/0331cab04a2fdad0a210263069fa143f6f7d038f","head":{"label":"gonum:addqr","ref":"addqr","sha":"0331cab04a2fdad0a210263069fa143f6f7d038f","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}","created_at":"2014-06-04T07:18:07Z","updated_at":"2015-07-29T04:04:03Z","pushed_at":"2015-08-03T16:22:28Z","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":null,"size":758,"stargazers_count":17,"watchers_count":17,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":17,"default_branch":"master"}},"base":{"label":"gonum:master","ref":"master","sha":"a5bda2fc247cb12935bb911558e8d7e02f9a4af6","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}","created_at":"2014-06-04T07:18:07Z","updated_at":"2015-07-29T04:04:03Z","pushed_at":"2015-08-03T16:22:28Z","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":null,"size":758,"stargazers_count":17,"watchers_count":17,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gonum/lapack/pulls/27"},"html":{"href":"https://github.com/gonum/lapack/pull/27"},"issue":{"href":"https://api.github.com/repos/gonum/lapack/issues/27"},"comments":{"href":"https://api.github.com/repos/gonum/lapack/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/gonum/lapack/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/gonum/lapack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gonum/lapack/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/gonum/lapack/statuses/0331cab04a2fdad0a210263069fa143f6f7d038f"}}}}