{"action":"created","comment":{"url":"https://api.github.com/repos/dmlc/mxnet/pulls/comments/48984706","id":48984706,"diff_hunk":"@@ -0,0 +1,154 @@\n+/*!\n+ * Copyright (c) 2015 by Contributors\n+ * \\file cast-inl.h\n+ * \\brief cast operator\n+ * \\author Junyuan Xie\n+*/\n+#ifndef MXNET_OPERATOR_CAST_INL_H_\n+#define MXNET_OPERATOR_CAST_INL_H_\n+\n+#include <dmlc/logging.h>\n+#include <dmlc/parameter.h>\n+#include <mxnet/operator.h>\n+#include <cstring>\n+#include <map>\n+#include <string>\n+#include <vector>\n+#include <utility>\n+#include \"./operator_common.h\"\n+\n+namespace mxnet {\n+namespace op {\n+// Declare enumeration of input order to make code more intuitive.\n+// // These enums are only visible within this header\n+namespace cast {\n+enum CastOpInputs {kData};\n+enum CastOpOutputs {kOut};\n+}  // cast\n+\n+struct CastParam : public dmlc::Parameter<CastParam> {\n+  // use int for enumeration\n+  int output_dtype;\n+  DMLC_DECLARE_PARAMETER(CastParam) {\n+    DMLC_DECLARE_FIELD(output_dtype)","path":"src/operator/cast-inl.h","position":33,"original_position":33,"commit_id":"b3258b57c9c9042dc10e3a68589665489e96787d","original_commit_id":"b3258b57c9c9042dc10e3a68589665489e96787d","user":{"login":"tqchen","id":2577440,"avatar_url":"https://avatars.githubusercontent.com/u/2577440?v=3","gravatar_id":"","url":"https://api.github.com/users/tqchen","html_url":"https://github.com/tqchen","followers_url":"https://api.github.com/users/tqchen/followers","following_url":"https://api.github.com/users/tqchen/following{/other_user}","gists_url":"https://api.github.com/users/tqchen/gists{/gist_id}","starred_url":"https://api.github.com/users/tqchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tqchen/subscriptions","organizations_url":"https://api.github.com/users/tqchen/orgs","repos_url":"https://api.github.com/users/tqchen/repos","events_url":"https://api.github.com/users/tqchen/events{/privacy}","received_events_url":"https://api.github.com/users/tqchen/received_events","type":"User","site_admin":false},"body":"simply use dtype","created_at":"2016-01-06T17:34:32Z","updated_at":"2016-01-06T17:34:32Z","html_url":"https://github.com/dmlc/mxnet/pull/1184#discussion_r48984706","pull_request_url":"https://api.github.com/repos/dmlc/mxnet/pulls/1184","_links":{"self":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/comments/48984706"},"html":{"href":"https://github.com/dmlc/mxnet/pull/1184#discussion_r48984706"},"pull_request":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/1184"}}},"pull_request":{"url":"https://api.github.com/repos/dmlc/mxnet/pulls/1184","id":55188059,"html_url":"https://github.com/dmlc/mxnet/pull/1184","diff_url":"https://github.com/dmlc/mxnet/pull/1184.diff","patch_url":"https://github.com/dmlc/mxnet/pull/1184.patch","issue_url":"https://api.github.com/repos/dmlc/mxnet/issues/1184","number":1184,"state":"open","locked":false,"title":"Type support","user":{"login":"piiswrong","id":568948,"avatar_url":"https://avatars.githubusercontent.com/u/568948?v=3","gravatar_id":"","url":"https://api.github.com/users/piiswrong","html_url":"https://github.com/piiswrong","followers_url":"https://api.github.com/users/piiswrong/followers","following_url":"https://api.github.com/users/piiswrong/following{/other_user}","gists_url":"https://api.github.com/users/piiswrong/gists{/gist_id}","starred_url":"https://api.github.com/users/piiswrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piiswrong/subscriptions","organizations_url":"https://api.github.com/users/piiswrong/orgs","repos_url":"https://api.github.com/users/piiswrong/repos","events_url":"https://api.github.com/users/piiswrong/events{/privacy}","received_events_url":"https://api.github.com/users/piiswrong/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-06T08:23:39Z","updated_at":"2016-01-06T17:34:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d5846f4ecce38126348e63c7d520a2ca41a8c3c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dmlc/mxnet/pulls/1184/commits","review_comments_url":"https://api.github.com/repos/dmlc/mxnet/pulls/1184/comments","review_comment_url":"https://api.github.com/repos/dmlc/mxnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dmlc/mxnet/issues/1184/comments","statuses_url":"https://api.github.com/repos/dmlc/mxnet/statuses/b3258b57c9c9042dc10e3a68589665489e96787d","head":{"label":"piiswrong:type","ref":"type","sha":"b3258b57c9c9042dc10e3a68589665489e96787d","user":{"login":"piiswrong","id":568948,"avatar_url":"https://avatars.githubusercontent.com/u/568948?v=3","gravatar_id":"","url":"https://api.github.com/users/piiswrong","html_url":"https://github.com/piiswrong","followers_url":"https://api.github.com/users/piiswrong/followers","following_url":"https://api.github.com/users/piiswrong/following{/other_user}","gists_url":"https://api.github.com/users/piiswrong/gists{/gist_id}","starred_url":"https://api.github.com/users/piiswrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piiswrong/subscriptions","organizations_url":"https://api.github.com/users/piiswrong/orgs","repos_url":"https://api.github.com/users/piiswrong/repos","events_url":"https://api.github.com/users/piiswrong/events{/privacy}","received_events_url":"https://api.github.com/users/piiswrong/received_events","type":"User","site_admin":false},"repo":{"id":44707337,"name":"mxnet","full_name":"piiswrong/mxnet","owner":{"login":"piiswrong","id":568948,"avatar_url":"https://avatars.githubusercontent.com/u/568948?v=3","gravatar_id":"","url":"https://api.github.com/users/piiswrong","html_url":"https://github.com/piiswrong","followers_url":"https://api.github.com/users/piiswrong/followers","following_url":"https://api.github.com/users/piiswrong/following{/other_user}","gists_url":"https://api.github.com/users/piiswrong/gists{/gist_id}","starred_url":"https://api.github.com/users/piiswrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piiswrong/subscriptions","organizations_url":"https://api.github.com/users/piiswrong/orgs","repos_url":"https://api.github.com/users/piiswrong/repos","events_url":"https://api.github.com/users/piiswrong/events{/privacy}","received_events_url":"https://api.github.com/users/piiswrong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/piiswrong/mxnet","description":"Efficient and Flexible Distributed Deep Learning Framework, for python, R, Julia and more","fork":true,"url":"https://api.github.com/repos/piiswrong/mxnet","forks_url":"https://api.github.com/repos/piiswrong/mxnet/forks","keys_url":"https://api.github.com/repos/piiswrong/mxnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piiswrong/mxnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piiswrong/mxnet/teams","hooks_url":"https://api.github.com/repos/piiswrong/mxnet/hooks","issue_events_url":"https://api.github.com/repos/piiswrong/mxnet/issues/events{/number}","events_url":"https://api.github.com/repos/piiswrong/mxnet/events","assignees_url":"https://api.github.com/repos/piiswrong/mxnet/assignees{/user}","branches_url":"https://api.github.com/repos/piiswrong/mxnet/branches{/branch}","tags_url":"https://api.github.com/repos/piiswrong/mxnet/tags","blobs_url":"https://api.github.com/repos/piiswrong/mxnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piiswrong/mxnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piiswrong/mxnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/piiswrong/mxnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piiswrong/mxnet/statuses/{sha}","languages_url":"https://api.github.com/repos/piiswrong/mxnet/languages","stargazers_url":"https://api.github.com/repos/piiswrong/mxnet/stargazers","contributors_url":"https://api.github.com/repos/piiswrong/mxnet/contributors","subscribers_url":"https://api.github.com/repos/piiswrong/mxnet/subscribers","subscription_url":"https://api.github.com/repos/piiswrong/mxnet/subscription","commits_url":"https://api.github.com/repos/piiswrong/mxnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/piiswrong/mxnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/piiswrong/mxnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/piiswrong/mxnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/piiswrong/mxnet/contents/{+path}","compare_url":"https://api.github.com/repos/piiswrong/mxnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piiswrong/mxnet/merges","archive_url":"https://api.github.com/repos/piiswrong/mxnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piiswrong/mxnet/downloads","issues_url":"https://api.github.com/repos/piiswrong/mxnet/issues{/number}","pulls_url":"https://api.github.com/repos/piiswrong/mxnet/pulls{/number}","milestones_url":"https://api.github.com/repos/piiswrong/mxnet/milestones{/number}","notifications_url":"https://api.github.com/repos/piiswrong/mxnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piiswrong/mxnet/labels{/name}","releases_url":"https://api.github.com/repos/piiswrong/mxnet/releases{/id}","created_at":"2015-10-21T22:07:57Z","updated_at":"2015-11-07T05:01:04Z","pushed_at":"2016-01-06T08:23:16Z","git_url":"git://github.com/piiswrong/mxnet.git","ssh_url":"git@github.com:piiswrong/mxnet.git","clone_url":"https://github.com/piiswrong/mxnet.git","svn_url":"https://github.com/piiswrong/mxnet","homepage":"http://mxnet.rtfd.org","size":4121,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"dmlc:master","ref":"master","sha":"ee4933864263d5e815b9aa56c00b89a81f568a1e","user":{"login":"dmlc","id":11508361,"avatar_url":"https://avatars.githubusercontent.com/u/11508361?v=3","gravatar_id":"","url":"https://api.github.com/users/dmlc","html_url":"https://github.com/dmlc","followers_url":"https://api.github.com/users/dmlc/followers","following_url":"https://api.github.com/users/dmlc/following{/other_user}","gists_url":"https://api.github.com/users/dmlc/gists{/gist_id}","starred_url":"https://api.github.com/users/dmlc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmlc/subscriptions","organizations_url":"https://api.github.com/users/dmlc/orgs","repos_url":"https://api.github.com/users/dmlc/repos","events_url":"https://api.github.com/users/dmlc/events{/privacy}","received_events_url":"https://api.github.com/users/dmlc/received_events","type":"Organization","site_admin":false},"repo":{"id":34864402,"name":"mxnet","full_name":"dmlc/mxnet","owner":{"login":"dmlc","id":11508361,"avatar_url":"https://avatars.githubusercontent.com/u/11508361?v=3","gravatar_id":"","url":"https://api.github.com/users/dmlc","html_url":"https://github.com/dmlc","followers_url":"https://api.github.com/users/dmlc/followers","following_url":"https://api.github.com/users/dmlc/following{/other_user}","gists_url":"https://api.github.com/users/dmlc/gists{/gist_id}","starred_url":"https://api.github.com/users/dmlc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmlc/subscriptions","organizations_url":"https://api.github.com/users/dmlc/orgs","repos_url":"https://api.github.com/users/dmlc/repos","events_url":"https://api.github.com/users/dmlc/events{/privacy}","received_events_url":"https://api.github.com/users/dmlc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dmlc/mxnet","description":"Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Go, Javascript and more","fork":false,"url":"https://api.github.com/repos/dmlc/mxnet","forks_url":"https://api.github.com/repos/dmlc/mxnet/forks","keys_url":"https://api.github.com/repos/dmlc/mxnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmlc/mxnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmlc/mxnet/teams","hooks_url":"https://api.github.com/repos/dmlc/mxnet/hooks","issue_events_url":"https://api.github.com/repos/dmlc/mxnet/issues/events{/number}","events_url":"https://api.github.com/repos/dmlc/mxnet/events","assignees_url":"https://api.github.com/repos/dmlc/mxnet/assignees{/user}","branches_url":"https://api.github.com/repos/dmlc/mxnet/branches{/branch}","tags_url":"https://api.github.com/repos/dmlc/mxnet/tags","blobs_url":"https://api.github.com/repos/dmlc/mxnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmlc/mxnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmlc/mxnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmlc/mxnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmlc/mxnet/statuses/{sha}","languages_url":"https://api.github.com/repos/dmlc/mxnet/languages","stargazers_url":"https://api.github.com/repos/dmlc/mxnet/stargazers","contributors_url":"https://api.github.com/repos/dmlc/mxnet/contributors","subscribers_url":"https://api.github.com/repos/dmlc/mxnet/subscribers","subscription_url":"https://api.github.com/repos/dmlc/mxnet/subscription","commits_url":"https://api.github.com/repos/dmlc/mxnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmlc/mxnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmlc/mxnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmlc/mxnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmlc/mxnet/contents/{+path}","compare_url":"https://api.github.com/repos/dmlc/mxnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmlc/mxnet/merges","archive_url":"https://api.github.com/repos/dmlc/mxnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmlc/mxnet/downloads","issues_url":"https://api.github.com/repos/dmlc/mxnet/issues{/number}","pulls_url":"https://api.github.com/repos/dmlc/mxnet/pulls{/number}","milestones_url":"https://api.github.com/repos/dmlc/mxnet/milestones{/number}","notifications_url":"https://api.github.com/repos/dmlc/mxnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmlc/mxnet/labels{/name}","releases_url":"https://api.github.com/repos/dmlc/mxnet/releases{/id}","created_at":"2015-04-30T16:21:15Z","updated_at":"2016-01-06T16:08:25Z","pushed_at":"2016-01-06T14:54:12Z","git_url":"git://github.com/dmlc/mxnet.git","ssh_url":"git@github.com:dmlc/mxnet.git","clone_url":"https://github.com/dmlc/mxnet.git","svn_url":"https://github.com/dmlc/mxnet","homepage":"http://mxnet.rtfd.org","size":5850,"stargazers_count":2217,"watchers_count":2217,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":719,"mirror_url":null,"open_issues_count":142,"forks":719,"open_issues":142,"watchers":2217,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/1184"},"html":{"href":"https://github.com/dmlc/mxnet/pull/1184"},"issue":{"href":"https://api.github.com/repos/dmlc/mxnet/issues/1184"},"comments":{"href":"https://api.github.com/repos/dmlc/mxnet/issues/1184/comments"},"review_comments":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/1184/comments"},"review_comment":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dmlc/mxnet/pulls/1184/commits"},"statuses":{"href":"https://api.github.com/repos/dmlc/mxnet/statuses/b3258b57c9c9042dc10e3a68589665489e96787d"}}}}