{"action":"created","issue":{"url":"https://api.github.com/repos/RobotLocomotion/drake/issues/3321","repository_url":"https://api.github.com/repos/RobotLocomotion/drake","labels_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/3321/labels{/name}","comments_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/3321/comments","events_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/3321/events","html_url":"https://github.com/RobotLocomotion/drake/pull/3321","id":174345068,"number":3321,"title":"Jacobian/Hessian AutoDiff utility functions","user":{"login":"tkoolen","id":2585880,"avatar_url":"https://avatars.githubusercontent.com/u/2585880?v=3","gravatar_id":"","url":"https://api.github.com/users/tkoolen","html_url":"https://github.com/tkoolen","followers_url":"https://api.github.com/users/tkoolen/followers","following_url":"https://api.github.com/users/tkoolen/following{/other_user}","gists_url":"https://api.github.com/users/tkoolen/gists{/gist_id}","starred_url":"https://api.github.com/users/tkoolen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkoolen/subscriptions","organizations_url":"https://api.github.com/users/tkoolen/orgs","repos_url":"https://api.github.com/users/tkoolen/repos","events_url":"https://api.github.com/users/tkoolen/events{/privacy}","received_events_url":"https://api.github.com/users/tkoolen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-08-31T18:32:00Z","updated_at":"2016-09-07T18:22:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/RobotLocomotion/drake/pulls/3321","html_url":"https://github.com/RobotLocomotion/drake/pull/3321","diff_url":"https://github.com/RobotLocomotion/drake/pull/3321.diff","patch_url":"https://github.com/RobotLocomotion/drake/pull/3321.patch"},"body":"Wrote some handy AutoDiff utility functions (`jacobian` and `hessian`) last night. These implement the chunking idea (https://github.com/RobotLocomotion/drake/issues/2619). \r\n\r\nThe `jacobian` algorithm computes the Jacobian in chunks of up to a specified maximum number of derivatives at a time. This has three purposes:\r\n* It makes it so that derivative vectors can be allocated on the stack, eliminating dynamic allocations and improving performance if the (maximum) number of derivatives cannot be determined at compile time.\r\n* It gives control over and limits the number of required instantiations of the call operator of the input functor and all the functions it calls.\r\n* Excessively large derivative vectors can result in CPU cache capacity misses; even if the number of derivatives is fixed at compile time, it may be better to break up into chunks if that means that cache capacity misses can be prevented.\r\n\r\nThe `hessian` algorithm is super simple: it just calls `jacobian` recursively.\r\n\r\nSee documentation and tests for more details.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/robotlocomotion/drake/3321)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/RobotLocomotion/drake/issues/comments/245371938","html_url":"https://github.com/RobotLocomotion/drake/pull/3321#issuecomment-245371938","issue_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/3321","id":245371938,"user":{"login":"sherm1","id":4088016,"avatar_url":"https://avatars.githubusercontent.com/u/4088016?v=3","gravatar_id":"","url":"https://api.github.com/users/sherm1","html_url":"https://github.com/sherm1","followers_url":"https://api.github.com/users/sherm1/followers","following_url":"https://api.github.com/users/sherm1/following{/other_user}","gists_url":"https://api.github.com/users/sherm1/gists{/gist_id}","starred_url":"https://api.github.com/users/sherm1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sherm1/subscriptions","organizations_url":"https://api.github.com/users/sherm1/orgs","repos_url":"https://api.github.com/users/sherm1/repos","events_url":"https://api.github.com/users/sherm1/events{/privacy}","received_events_url":"https://api.github.com/users/sherm1/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T18:22:10Z","updated_at":"2016-09-07T18:22:10Z","body":"<img class=\"emoji\" title=\":lgtm:\" alt=\":lgtm:\" align=\"absmiddle\" src=\"https://reviewable.io/lgtm.png\" height=\"20\" width=\"61\"/> -- @hongkai-dai you still have a blocking thread here to ack.\n\n---\n\nReviewed 1 of 1 files at r4.\nReview status: all files reviewed at latest revision, 2 unresolved discussions.\n\n---\n\n*[drake/math/test/autodiff_test.cc, line 97 \\[r2\\]](https://reviewable.io:443/reviews/robotlocomotion/drake/3321#-KR1GacL0NHGp8KDHUvm:-KR4sC0EnOjU69fx2OFw:bnv7q5r) ([raw file](https://github.com/robotlocomotion/drake/blob/0a17505ce34e7220a4fba2a8e10922ebdeca611b/drake/math/test/autodiff_test.cc#L97)):*\n<details><summary><i>Previously, tkoolen (Twan Koolen) wrote…</i></summary>\n> Alright, alright. Done.\n</details>\nThanks, Twan!\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/robotlocomotion/drake/3321#-:-KR4sZzfYomRyTqQMVbJ:b-n624my)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"sherm1"}}