{"action":"created","comment":{"url":"https://api.github.com/repos/thomasmoelhave/tpie/pulls/comments/67331497","id":67331497,"diff_hunk":"@@ -49,26 +49,36 @@ class proxy_progress_indicator : public tpie::progress_indicator_base {\n \n } // namespace bits\n \n-struct node_parameters {\n-\tnode_parameters();\n+enum node_resource_type {\n+\tFILES,\n+\tMEMORY,\n+\n+\t// Special value for internal use\n+\tTOTAL_RESOURCE_TYPES\n+};\n \n-\tint minimumFileDescriptors;\n-\tint maximumFileDescriptors;\n-\tdouble fileDescriptorFraction;\n+struct node_resource_parameters {\n+\tmemory_size_type minimum = 0;\n+\tmemory_size_type maximum = std::numeric_limits<memory_size_type>::max();\n+\tdouble fraction = 0.0;\n \n-\tmemory_size_type minimumMemory;\n-\tmemory_size_type maximumMemory;\n-\tdouble memoryFraction;\n+\tmemory_size_type available = 0;\n+};\n+\n+struct node_parameters {\n+\tnode_resource_parameters resource_parameters[TOTAL_RESOURCE_TYPES];\n \n \tstd::string name;\n-\tpriority_type namePriority;\n+\tpriority_type namePriority = PRIORITY_NO_NAME;\n \n \tstd::string phaseName;\n-\tpriority_type phaseNamePriority;\n+\tpriority_type phaseNamePriority = PRIORITY_NO_NAME;\n \n-\tstream_size_type stepsTotal;\n+\tstream_size_type stepsTotal = 0;\n };\n \n+#define RES_PARAM(type, name) m_parameters.resource_parameters[type].name\n+","path":"tpie/pipelining/node.h","position":null,"original_position":68,"commit_id":"d5c828d568fa06809f3b79ea88b621ecb65e775f","original_commit_id":"447ae9a428c7db940225131ad02798514b442382","user":{"login":"antialize","id":84282,"avatar_url":"https://avatars.githubusercontent.com/u/84282?v=3","gravatar_id":"","url":"https://api.github.com/users/antialize","html_url":"https://github.com/antialize","followers_url":"https://api.github.com/users/antialize/followers","following_url":"https://api.github.com/users/antialize/following{/other_user}","gists_url":"https://api.github.com/users/antialize/gists{/gist_id}","starred_url":"https://api.github.com/users/antialize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antialize/subscriptions","organizations_url":"https://api.github.com/users/antialize/orgs","repos_url":"https://api.github.com/users/antialize/repos","events_url":"https://api.github.com/users/antialize/events{/privacy}","received_events_url":"https://api.github.com/users/antialize/received_events","type":"User","site_admin":false},"body":"macroes should start with TPIE_ and be undefed. Is this macro necessary?","created_at":"2016-06-16T11:58:08Z","updated_at":"2016-06-16T11:58:08Z","html_url":"https://github.com/thomasmoelhave/tpie/pull/207#discussion_r67331497","pull_request_url":"https://api.github.com/repos/thomasmoelhave/tpie/pulls/207","_links":{"self":{"href":"https://api.github.com/repos/thomasmoelhave/tpie/pulls/comments/67331497"},"html":{"href":"https://github.com/thomasmoelhave/tpie/pull/207#discussion_r67331497"},"pull_request":{"href":"https://api.github.com/repos/thomasmoelhave/tpie/pulls/207"}}},"pull_request":{"url":"https://api.github.com/repos/thomasmoelhave/tpie/pulls/207","id":73499108,"html_url":"https://github.com/thomasmoelhave/tpie/pull/207","diff_url":"https://github.com/thomasmoelhave/tpie/pull/207.diff","patch_url":"https://github.com/thomasmoelhave/tpie/pull/207.patch","issue_url":"https://api.github.com/repos/thomasmoelhave/tpie/issues/207","number":207,"state":"open","locked":false,"title":"Manage file descriptors like we do with memory","user":{"login":"Tyilo","id":568036,"avatar_url":"https://avatars.githubusercontent.com/u/568036?v=3","gravatar_id":"","url":"https://api.github.com/users/Tyilo","html_url":"https://github.com/Tyilo","followers_url":"https://api.github.com/users/Tyilo/followers","following_url":"https://api.github.com/users/Tyilo/following{/other_user}","gists_url":"https://api.github.com/users/Tyilo/gists{/gist_id}","starred_url":"https://api.github.com/users/Tyilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tyilo/subscriptions","organizations_url":"https://api.github.com/users/Tyilo/orgs","repos_url":"https://api.github.com/users/Tyilo/repos","events_url":"https://api.github.com/users/Tyilo/events{/privacy}","received_events_url":"https://api.github.com/users/Tyilo/received_events","type":"User","site_admin":false},"body":"Adds a new `file_manager`, which manages the amount of open files, which can be used like the memory manager (`get_file_manager().register_increased_usage(...)`). Both of the manager has been made a subclass of the new `resource_manager` and similarly the `memory_runtime` and the new `file_runtime` are also subclasses of the new `resource_runtime`.\r\n\r\nIn pipelining we now also assign files to nodes before assigning memory. Both `serialization_sorter` and the pipeline `merge_sorter` has been updated to accommodate this.\r\n\r\nAll the getters and setters for min/max/fraction/available memory now use the new interface where you give the type of the resource (`FILES` / `MEMORY`) as the first parameter and files can only be managed through these new functions. `set_available_memory` was used as both a callback to notify the node the amount of available memory has changed, but also internally when assigning memory. I have split the function in the new interface into `resource_available_changed` and `_internal_set_available_of_resource`, where only `resource_available_changed` is virtual and does nothing by default.","created_at":"2016-06-12T15:34:00Z","updated_at":"2016-06-16T11:58:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thomasmoelhave/tpie/pulls/207/commits","review_comments_url":"https://api.github.com/repos/thomasmoelhave/tpie/pulls/207/comments","review_comment_url":"https://api.github.com/repos/thomasmoelhave/tpie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thomasmoelhave/tpie/issues/207/comments","statuses_url":"https://api.github.com/repos/thomasmoelhave/tpie/statuses/d5c828d568fa06809f3b79ea88b621ecb65e775f","head":{"label":"thomasmoelhave:manage-fds","ref":"manage-fds","sha":"d5c828d568fa06809f3b79ea88b621ecb65e775f","user":{"login":"thomasmoelhave","id":179143,"avatar_url":"https://avatars.githubusercontent.com/u/179143?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasmoelhave","html_url":"https://github.com/thomasmoelhave","followers_url":"https://api.github.com/users/thomasmoelhave/followers","following_url":"https://api.github.com/users/thomasmoelhave/following{/other_user}","gists_url":"https://api.github.com/users/thomasmoelhave/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasmoelhave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasmoelhave/subscriptions","organizations_url":"https://api.github.com/users/thomasmoelhave/orgs","repos_url":"https://api.github.com/users/thomasmoelhave/repos","events_url":"https://api.github.com/users/thomasmoelhave/events{/privacy}","received_events_url":"https://api.github.com/users/thomasmoelhave/received_events","type":"User","site_admin":false},"repo":{"id":466542,"name":"tpie","full_name":"thomasmoelhave/tpie","owner":{"login":"thomasmoelhave","id":179143,"avatar_url":"https://avatars.githubusercontent.com/u/179143?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasmoelhave","html_url":"https://github.com/thomasmoelhave","followers_url":"https://api.github.com/users/thomasmoelhave/followers","following_url":"https://api.github.com/users/thomasmoelhave/following{/other_user}","gists_url":"https://api.github.com/users/thomasmoelhave/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasmoelhave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasmoelhave/subscriptions","organizations_url":"https://api.github.com/users/thomasmoelhave/orgs","repos_url":"https://api.github.com/users/thomasmoelhave/repos","events_url":"https://api.github.com/users/thomasmoelhave/events{/privacy}","received_events_url":"https://api.github.com/users/thomasmoelhave/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thomasmoelhave/tpie","description":"Templated Portable I/O Environment","fork":false,"url":"https://api.github.com/repos/thomasmoelhave/tpie","forks_url":"https://api.github.com/repos/thomasmoelhave/tpie/forks","keys_url":"https://api.github.com/repos/thomasmoelhave/tpie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thomasmoelhave/tpie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thomasmoelhave/tpie/teams","hooks_url":"https://api.github.com/repos/thomasmoelhave/tpie/hooks","issue_events_url":"https://api.github.com/repos/thomasmoelhave/tpie/issues/events{/number}","events_url":"https://api.github.com/repos/thomasmoelhave/tpie/events","assignees_url":"https://api.github.com/repos/thomasmoelhave/tpie/assignees{/user}","branches_url":"https://api.github.com/repos/thomasmoelhave/tpie/branches{/branch}","tags_url":"https://api.github.com/repos/thomasmoelhave/tpie/tags","blobs_url":"https://api.github.com/repos/thomasmoelhave/tpie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thomasmoelhave/tpie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thomasmoelhave/tpie/git/refs{/sha}","trees_url":"https://api.github.com/repos/thomasmoelhave/tpie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thomasmoelhave/tpie/statuses/{sha}","languages_url":"https://api.github.com/repos/thomasmoelhave/tpie/languages","stargazers_url":"https://api.github.com/repos/thomasmoelhave/tpie/stargazers","contributors_url":"https://api.github.com/repos/thomasmoelhave/tpie/contributors","subscribers_url":"https://api.github.com/repos/thomasmoelhave/tpie/subscribers","subscription_url":"https://api.github.com/repos/thomasmoelhave/tpie/subscription","commits_url":"https://api.github.com/repos/thomasmoelhave/tpie/commits{/sha}","git_commits_url":"https://api.github.com/repos/thomasmoelhave/tpie/git/commits{/sha}","comments_url":"https://api.github.com/repos/thomasmoelhave/tpie/comments{/number}","issue_comment_url":"https://api.github.com/repos/thomasmoelhave/tpie/issues/comments{/number}","contents_url":"https://api.github.com/repos/thomasmoelhave/tpie/contents/{+path}","compare_url":"https://api.github.com/repos/thomasmoelhave/tpie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thomasmoelhave/tpie/merges","archive_url":"https://api.github.com/repos/thomasmoelhave/tpie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thomasmoelhave/tpie/downloads","issues_url":"https://api.github.com/repos/thomasmoelhave/tpie/issues{/number}","pulls_url":"https://api.github.com/repos/thomasmoelhave/tpie/pulls{/number}","milestones_url":"https://api.github.com/repos/thomasmoelhave/tpie/milestones{/number}","notifications_url":"https://api.github.com/repos/thomasmoelhave/tpie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thomasmoelhave/tpie/labels{/name}","releases_url":"https://api.github.com/repos/thomasmoelhave/tpie/releases{/id}","deployments_url":"https://api.github.com/repos/thomasmoelhave/tpie/deployments","created_at":"2010-01-10T20:16:54Z","updated_at":"2016-06-14T18:38:02Z","pushed_at":"2016-06-16T10:22:41Z","git_url":"git://github.com/thomasmoelhave/tpie.git","ssh_url":"git@github.com:thomasmoelhave/tpie.git","clone_url":"https://github.com/thomasmoelhave/tpie.git","svn_url":"https://github.com/thomasmoelhave/tpie","homepage":"http://madalgo.au.dk/tpie","size":22645,"stargazers_count":55,"watchers_count":55,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":40,"forks":11,"open_issues":40,"watchers":55,"default_branch":"master"}},"base":{"label":"thomasmoelhave:master","ref":"master","sha":"8756589c47aee0f7b745e73a02266d5af2d7d606","user":{"login":"thomasmoelhave","id":179143,"avatar_url":"https://avatars.githubusercontent.com/u/179143?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasmoelhave","html_url":"https://github.com/thomasmoelhave","followers_url":"https://api.github.com/users/thomasmoelhave/followers","following_url":"https://api.github.com/users/thomasmoelhave/following{/other_user}","gists_url":"https://api.github.com/users/thomasmoelhave/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasmoelhave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasmoelhave/subscriptions","organizations_url":"https://api.github.com/users/thomasmoelhave/orgs","repos_url":"https://api.github.com/users/thomasmoelhave/repos","events_url":"https://api.github.com/users/thomasmoelhave/events{/privacy}","received_events_url":"https://api.github.com/users/thomasmoelhave/received_events","type":"User","site_admin":false},"repo":{"id":466542,"name":"tpie","full_name":"thomasmoelhave/tpie","owner":{"login":"thomasmoelhave","id":179143,"avatar_url":"https://avatars.githubusercontent.com/u/179143?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasmoelhave","html_url":"https://github.com/thomasmoelhave","followers_url":"https://api.github.com/users/thomasmoelhave/followers","following_url":"https://api.github.com/users/thomasmoelhave/following{/other_user}","gists_url":"https://api.github.com/users/thomasmoelhave/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasmoelhave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasmoelhave/subscriptions","organizations_url":"https://api.github.com/users/thomasmoelhave/orgs","repos_url":"https://api.github.com/users/thomasmoelhave/repos","events_url":"https://api.github.com/users/thomasmoelhave/events{/privacy}","received_events_url":"https://api.github.com/users/thomasmoelhave/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thomasmoelhave/tpie","description":"Templated Portable I/O Environment","fork":false,"url":"https://api.github.com/repos/thomasmoelhave/tpie","forks_url":"https://api.github.com/repos/thomasmoelhave/tpie/forks","keys_url":"https://api.github.com/repos/thomasmoelhave/tpie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thomasmoelhave/tpie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thomasmoelhave/tpie/teams","hooks_url":"https://api.github.com/repos/thomasmoelhave/tpie/hooks","issue_events_url":"https://api.github.com/repos/thomasmoelhave/tpie/issues/events{/number}","events_url":"https://api.github.com/repos/thomasmoelhave/tpie/events","assignees_url":"https://api.github.com/repos/thomasmoelhave/tpie/assignees{/user}","branches_url":"https://api.github.com/repos/thomasmoelhave/tpie/branches{/branch}","tags_url":"https://api.github.com/repos/thomasmoelhave/tpie/tags","blobs_url":"https://api.github.com/repos/thomasmoelhave/tpie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thomasmoelhave/tpie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thomasmoelhave/tpie/git/refs{/sha}","trees_url":"https://api.github.com/repos/thomasmoelhave/tpie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thomasmoelhave/tpie/statuses/{sha}","languages_url":"https://api.github.com/repos/thomasmoelhave/tpie/languages","stargazers_url":"https://api.github.com/repos/thomasmoelhave/tpie/stargazers","contributors_url":"https://api.github.com/repos/thomasmoelhave/tpie/contributors","subscribers_url":"https://api.github.com/repos/thomasmoelhave/tpie/subscribers","subscription_url":"https://api.github.com/repos/thomasmoelhave/tpie/subscription","commits_url":"https://api.github.com/repos/thomasmoelhave/tpie/commits{/sha}","git_commits_url":"https://api.github.com/repos/thomasmoelhave/tpie/git/commits{/sha}","comments_url":"https://api.github.com/repos/thomasmoelhave/tpie/comments{/number}","issue_comment_url":"https://api.github.com/repos/thomasmoelhave/tpie/issues/comments{/number}","contents_url":"https://api.github.com/repos/thomasmoelhave/tpie/contents/{+path}","compare_url":"https://api.github.com/repos/thomasmoelhave/tpie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thomasmoelhave/tpie/merges","archive_url":"https://api.github.com/repos/thomasmoelhave/tpie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thomasmoelhave/tpie/downloads","issues_url":"https://api.github.com/repos/thomasmoelhave/tpie/issues{/number}","pulls_url":"https://api.github.com/repos/thomasmoelhave/tpie/pulls{/number}","milestones_url":"https://api.github.com/repos/thomasmoelhave/tpie/milestones{/number}","notifications_url":"https://api.github.com/repos/thomasmoelhave/tpie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thomasmoelhave/tpie/labels{/name}","releases_url":"https://api.github.com/repos/thomasmoelhave/tpie/releases{/id}","deployments_url":"https://api.github.com/repos/thomasmoelhave/tpie/deployments","created_at":"2010-01-10T20:16:54Z","updated_at":"2016-06-14T18:38:02Z","pushed_at":"2016-06-16T10:22:41Z","git_url":"git://github.com/thomasmoelhave/tpie.git","ssh_url":"git@github.com:thomasmoelhave/tpie.git","clone_url":"https://github.com/thomasmoelhave/tpie.git","svn_url":"https://github.com/thomasmoelhave/tpie","homepage":"http://madalgo.au.dk/tpie","size":22645,"stargazers_count":55,"watchers_count":55,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":40,"forks":11,"open_issues":40,"watchers":55,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thomasmoelhave/tpie/pulls/207"},"html":{"href":"https://github.com/thomasmoelhave/tpie/pull/207"},"issue":{"href":"https://api.github.com/repos/thomasmoelhave/tpie/issues/207"},"comments":{"href":"https://api.github.com/repos/thomasmoelhave/tpie/issues/207/comments"},"review_comments":{"href":"https://api.github.com/repos/thomasmoelhave/tpie/pulls/207/comments"},"review_comment":{"href":"https://api.github.com/repos/thomasmoelhave/tpie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thomasmoelhave/tpie/pulls/207/commits"},"statuses":{"href":"https://api.github.com/repos/thomasmoelhave/tpie/statuses/d5c828d568fa06809f3b79ea88b621ecb65e775f"}}}}
{"actor":{"display_login":"antialize"}}