{"action":"created","comment":{"url":"https://api.github.com/repos/BVLC/caffe/pulls/comments/38782700","id":38782700,"diff_hunk":"@@ -8,24 +8,32 @@ namespace caffe { namespace db {\n \n DB* GetDB(DataParameter::DB backend) {\n   switch (backend) {\n+#ifdef USE_LEVELDB\n   case DataParameter_DB_LEVELDB:\n     return new LevelDB();\n+#endif\n+#ifdef USE_LMDB\n   case DataParameter_DB_LMDB:\n     return new LMDB();\n+#endif\n   default:\n     LOG(FATAL) << \"Unknown database backend\";\n   }\n }\n \n DB* GetDB(const string& backend) {\n+#ifdef USE_LEVELDB\n   if (backend == \"leveldb\") {\n     return new LevelDB();\n-  } else if (backend == \"lmdb\") {\n+  }\n+#endif\n+#ifdef USE_LMDB\n+if (backend == \"lmdb\") {\n     return new LMDB();\n-  } else {\n-    LOG(FATAL) << \"Unknown database backend\";\n   }\n-}\n+#endif\n+  LOG(FATAL) << \"Unknown database backend\";\n+  }","path":"src/caffe/util/db.cpp","position":33,"original_position":33,"commit_id":"4fef7429b1b89d835827df7543ec662332d9fafc","original_commit_id":"4fef7429b1b89d835827df7543ec662332d9fafc","user":{"login":"jeffdonahue","id":965190,"avatar_url":"https://avatars.githubusercontent.com/u/965190?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffdonahue","html_url":"https://github.com/jeffdonahue","followers_url":"https://api.github.com/users/jeffdonahue/followers","following_url":"https://api.github.com/users/jeffdonahue/following{/other_user}","gists_url":"https://api.github.com/users/jeffdonahue/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffdonahue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffdonahue/subscriptions","organizations_url":"https://api.github.com/users/jeffdonahue/orgs","repos_url":"https://api.github.com/users/jeffdonahue/repos","events_url":"https://api.github.com/users/jeffdonahue/events{/privacy}","received_events_url":"https://api.github.com/users/jeffdonahue/received_events","type":"User","site_admin":false},"body":"fix indentation","created_at":"2015-09-04T18:48:48Z","updated_at":"2015-09-04T18:48:48Z","html_url":"https://github.com/BVLC/caffe/pull/2523#discussion_r38782700","pull_request_url":"https://api.github.com/repos/BVLC/caffe/pulls/2523","_links":{"self":{"href":"https://api.github.com/repos/BVLC/caffe/pulls/comments/38782700"},"html":{"href":"https://github.com/BVLC/caffe/pull/2523#discussion_r38782700"},"pull_request":{"href":"https://api.github.com/repos/BVLC/caffe/pulls/2523"}}},"pull_request":{"url":"https://api.github.com/repos/BVLC/caffe/pulls/2523","id":36397325,"html_url":"https://github.com/BVLC/caffe/pull/2523","diff_url":"https://github.com/BVLC/caffe/pull/2523.diff","patch_url":"https://github.com/BVLC/caffe/pull/2523.patch","issue_url":"https://api.github.com/repos/BVLC/caffe/issues/2523","number":2523,"state":"open","locked":false,"title":"Separate dependencies for configurable installation","user":{"login":"eelstork","id":8023152,"avatar_url":"https://avatars.githubusercontent.com/u/8023152?v=3","gravatar_id":"","url":"https://api.github.com/users/eelstork","html_url":"https://github.com/eelstork","followers_url":"https://api.github.com/users/eelstork/followers","following_url":"https://api.github.com/users/eelstork/following{/other_user}","gists_url":"https://api.github.com/users/eelstork/gists{/gist_id}","starred_url":"https://api.github.com/users/eelstork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eelstork/subscriptions","organizations_url":"https://api.github.com/users/eelstork/orgs","repos_url":"https://api.github.com/users/eelstork/repos","events_url":"https://api.github.com/users/eelstork/events{/privacy}","received_events_url":"https://api.github.com/users/eelstork/received_events","type":"User","site_admin":false},"body":"Addresses #1738.\r\nThe PR benefited earlier attempts by @cypof (#2402) and @kloudkl (#1074).\r\nOptions provided include USE_OPENCV, USE_LMDB, USE_LEVELDB, USE_HDF5, USE_SNAPPY, with both make and CMake flags available.\r\nThis allows selecting which IO libraries to build with. Wherever possible functions that would behave incorrectly as a result of disabling a library are excluded before runtime.\r\n\r\nAdded two items to the test matrix:\r\n    - WITH_CUDA=false WITH_CMAKE=false WITH_IO=false\r\n    - WITH_CUDA=false WITH_CMAKE=true WITH_IO=false\r\n\r\nWithout bloating the test matrix, it is essential to have at least one of these, otherwise correct separation of these dependencies would be unmaintainable.","created_at":"2015-05-28T11:36:12Z","updated_at":"2015-09-04T18:48:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"02bb0c81e52b22aca1837fb43436d9acf54cf762","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BVLC/caffe/pulls/2523/commits","review_comments_url":"https://api.github.com/repos/BVLC/caffe/pulls/2523/comments","review_comment_url":"https://api.github.com/repos/BVLC/caffe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BVLC/caffe/issues/2523/comments","statuses_url":"https://api.github.com/repos/BVLC/caffe/statuses/4fef7429b1b89d835827df7543ec662332d9fafc","head":{"label":"BonsaiAI:separate-io-dependencies","ref":"separate-io-dependencies","sha":"4fef7429b1b89d835827df7543ec662332d9fafc","user":{"login":"BonsaiAI","id":12539168,"avatar_url":"https://avatars.githubusercontent.com/u/12539168?v=3","gravatar_id":"","url":"https://api.github.com/users/BonsaiAI","html_url":"https://github.com/BonsaiAI","followers_url":"https://api.github.com/users/BonsaiAI/followers","following_url":"https://api.github.com/users/BonsaiAI/following{/other_user}","gists_url":"https://api.github.com/users/BonsaiAI/gists{/gist_id}","starred_url":"https://api.github.com/users/BonsaiAI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BonsaiAI/subscriptions","organizations_url":"https://api.github.com/users/BonsaiAI/orgs","repos_url":"https://api.github.com/users/BonsaiAI/repos","events_url":"https://api.github.com/users/BonsaiAI/events{/privacy}","received_events_url":"https://api.github.com/users/BonsaiAI/received_events","type":"Organization","site_admin":false},"repo":{"id":36049035,"name":"caffe","full_name":"BonsaiAI/caffe","owner":{"login":"BonsaiAI","id":12539168,"avatar_url":"https://avatars.githubusercontent.com/u/12539168?v=3","gravatar_id":"","url":"https://api.github.com/users/BonsaiAI","html_url":"https://github.com/BonsaiAI","followers_url":"https://api.github.com/users/BonsaiAI/followers","following_url":"https://api.github.com/users/BonsaiAI/following{/other_user}","gists_url":"https://api.github.com/users/BonsaiAI/gists{/gist_id}","starred_url":"https://api.github.com/users/BonsaiAI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BonsaiAI/subscriptions","organizations_url":"https://api.github.com/users/BonsaiAI/orgs","repos_url":"https://api.github.com/users/BonsaiAI/repos","events_url":"https://api.github.com/users/BonsaiAI/events{/privacy}","received_events_url":"https://api.github.com/users/BonsaiAI/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BonsaiAI/caffe","description":"Caffe: a fast open framework for deep learning.","fork":true,"url":"https://api.github.com/repos/BonsaiAI/caffe","forks_url":"https://api.github.com/repos/BonsaiAI/caffe/forks","keys_url":"https://api.github.com/repos/BonsaiAI/caffe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BonsaiAI/caffe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BonsaiAI/caffe/teams","hooks_url":"https://api.github.com/repos/BonsaiAI/caffe/hooks","issue_events_url":"https://api.github.com/repos/BonsaiAI/caffe/issues/events{/number}","events_url":"https://api.github.com/repos/BonsaiAI/caffe/events","assignees_url":"https://api.github.com/repos/BonsaiAI/caffe/assignees{/user}","branches_url":"https://api.github.com/repos/BonsaiAI/caffe/branches{/branch}","tags_url":"https://api.github.com/repos/BonsaiAI/caffe/tags","blobs_url":"https://api.github.com/repos/BonsaiAI/caffe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BonsaiAI/caffe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BonsaiAI/caffe/git/refs{/sha}","trees_url":"https://api.github.com/repos/BonsaiAI/caffe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BonsaiAI/caffe/statuses/{sha}","languages_url":"https://api.github.com/repos/BonsaiAI/caffe/languages","stargazers_url":"https://api.github.com/repos/BonsaiAI/caffe/stargazers","contributors_url":"https://api.github.com/repos/BonsaiAI/caffe/contributors","subscribers_url":"https://api.github.com/repos/BonsaiAI/caffe/subscribers","subscription_url":"https://api.github.com/repos/BonsaiAI/caffe/subscription","commits_url":"https://api.github.com/repos/BonsaiAI/caffe/commits{/sha}","git_commits_url":"https://api.github.com/repos/BonsaiAI/caffe/git/commits{/sha}","comments_url":"https://api.github.com/repos/BonsaiAI/caffe/comments{/number}","issue_comment_url":"https://api.github.com/repos/BonsaiAI/caffe/issues/comments{/number}","contents_url":"https://api.github.com/repos/BonsaiAI/caffe/contents/{+path}","compare_url":"https://api.github.com/repos/BonsaiAI/caffe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BonsaiAI/caffe/merges","archive_url":"https://api.github.com/repos/BonsaiAI/caffe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BonsaiAI/caffe/downloads","issues_url":"https://api.github.com/repos/BonsaiAI/caffe/issues{/number}","pulls_url":"https://api.github.com/repos/BonsaiAI/caffe/pulls{/number}","milestones_url":"https://api.github.com/repos/BonsaiAI/caffe/milestones{/number}","notifications_url":"https://api.github.com/repos/BonsaiAI/caffe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BonsaiAI/caffe/labels{/name}","releases_url":"https://api.github.com/repos/BonsaiAI/caffe/releases{/id}","created_at":"2015-05-22T02:54:44Z","updated_at":"2015-05-22T02:54:46Z","pushed_at":"2015-09-03T11:10:18Z","git_url":"git://github.com/BonsaiAI/caffe.git","ssh_url":"git@github.com:BonsaiAI/caffe.git","clone_url":"https://github.com/BonsaiAI/caffe.git","svn_url":"https://github.com/BonsaiAI/caffe","homepage":"http://caffe.berkeleyvision.org/","size":37732,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"BVLC:master","ref":"master","sha":"e8e660d3ca5b5d8d1e8f2853c0d606cb525d8a72","user":{"login":"BVLC","id":6182163,"avatar_url":"https://avatars.githubusercontent.com/u/6182163?v=3","gravatar_id":"","url":"https://api.github.com/users/BVLC","html_url":"https://github.com/BVLC","followers_url":"https://api.github.com/users/BVLC/followers","following_url":"https://api.github.com/users/BVLC/following{/other_user}","gists_url":"https://api.github.com/users/BVLC/gists{/gist_id}","starred_url":"https://api.github.com/users/BVLC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BVLC/subscriptions","organizations_url":"https://api.github.com/users/BVLC/orgs","repos_url":"https://api.github.com/users/BVLC/repos","events_url":"https://api.github.com/users/BVLC/events{/privacy}","received_events_url":"https://api.github.com/users/BVLC/received_events","type":"Organization","site_admin":false},"repo":{"id":12791642,"name":"caffe","full_name":"BVLC/caffe","owner":{"login":"BVLC","id":6182163,"avatar_url":"https://avatars.githubusercontent.com/u/6182163?v=3","gravatar_id":"","url":"https://api.github.com/users/BVLC","html_url":"https://github.com/BVLC","followers_url":"https://api.github.com/users/BVLC/followers","following_url":"https://api.github.com/users/BVLC/following{/other_user}","gists_url":"https://api.github.com/users/BVLC/gists{/gist_id}","starred_url":"https://api.github.com/users/BVLC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BVLC/subscriptions","organizations_url":"https://api.github.com/users/BVLC/orgs","repos_url":"https://api.github.com/users/BVLC/repos","events_url":"https://api.github.com/users/BVLC/events{/privacy}","received_events_url":"https://api.github.com/users/BVLC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BVLC/caffe","description":"Caffe: a fast open framework for deep learning.","fork":false,"url":"https://api.github.com/repos/BVLC/caffe","forks_url":"https://api.github.com/repos/BVLC/caffe/forks","keys_url":"https://api.github.com/repos/BVLC/caffe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BVLC/caffe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BVLC/caffe/teams","hooks_url":"https://api.github.com/repos/BVLC/caffe/hooks","issue_events_url":"https://api.github.com/repos/BVLC/caffe/issues/events{/number}","events_url":"https://api.github.com/repos/BVLC/caffe/events","assignees_url":"https://api.github.com/repos/BVLC/caffe/assignees{/user}","branches_url":"https://api.github.com/repos/BVLC/caffe/branches{/branch}","tags_url":"https://api.github.com/repos/BVLC/caffe/tags","blobs_url":"https://api.github.com/repos/BVLC/caffe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BVLC/caffe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BVLC/caffe/git/refs{/sha}","trees_url":"https://api.github.com/repos/BVLC/caffe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BVLC/caffe/statuses/{sha}","languages_url":"https://api.github.com/repos/BVLC/caffe/languages","stargazers_url":"https://api.github.com/repos/BVLC/caffe/stargazers","contributors_url":"https://api.github.com/repos/BVLC/caffe/contributors","subscribers_url":"https://api.github.com/repos/BVLC/caffe/subscribers","subscription_url":"https://api.github.com/repos/BVLC/caffe/subscription","commits_url":"https://api.github.com/repos/BVLC/caffe/commits{/sha}","git_commits_url":"https://api.github.com/repos/BVLC/caffe/git/commits{/sha}","comments_url":"https://api.github.com/repos/BVLC/caffe/comments{/number}","issue_comment_url":"https://api.github.com/repos/BVLC/caffe/issues/comments{/number}","contents_url":"https://api.github.com/repos/BVLC/caffe/contents/{+path}","compare_url":"https://api.github.com/repos/BVLC/caffe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BVLC/caffe/merges","archive_url":"https://api.github.com/repos/BVLC/caffe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BVLC/caffe/downloads","issues_url":"https://api.github.com/repos/BVLC/caffe/issues{/number}","pulls_url":"https://api.github.com/repos/BVLC/caffe/pulls{/number}","milestones_url":"https://api.github.com/repos/BVLC/caffe/milestones{/number}","notifications_url":"https://api.github.com/repos/BVLC/caffe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BVLC/caffe/labels{/name}","releases_url":"https://api.github.com/repos/BVLC/caffe/releases{/id}","created_at":"2013-09-12T18:39:48Z","updated_at":"2015-09-04T18:43:17Z","pushed_at":"2015-09-04T17:36:32Z","git_url":"git://github.com/BVLC/caffe.git","ssh_url":"git@github.com:BVLC/caffe.git","clone_url":"https://github.com/BVLC/caffe.git","svn_url":"https://github.com/BVLC/caffe","homepage":"http://caffe.berkeleyvision.org/","size":85972,"stargazers_count":5830,"watchers_count":5830,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3284,"mirror_url":null,"open_issues_count":370,"forks":3284,"open_issues":370,"watchers":5830,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BVLC/caffe/pulls/2523"},"html":{"href":"https://github.com/BVLC/caffe/pull/2523"},"issue":{"href":"https://api.github.com/repos/BVLC/caffe/issues/2523"},"comments":{"href":"https://api.github.com/repos/BVLC/caffe/issues/2523/comments"},"review_comments":{"href":"https://api.github.com/repos/BVLC/caffe/pulls/2523/comments"},"review_comment":{"href":"https://api.github.com/repos/BVLC/caffe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BVLC/caffe/pulls/2523/commits"},"statuses":{"href":"https://api.github.com/repos/BVLC/caffe/statuses/4fef7429b1b89d835827df7543ec662332d9fafc"}}}}