Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
5a180b58
提交
5a180b58
authored
1月 01, 2021
作者:
Brandon T. Willard
提交者:
Brandon T. Willard
1月 01, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move theano.gof.utils.c_cpp_keywords to theano.gof.params_type
上级
108ae5dc
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
106 行增加
和
106 行删除
+106
-106
params_type.py
theano/gof/params_type.py
+106
-1
utils.py
theano/gof/utils.py
+0
-105
没有找到文件。
theano/gof/params_type.py
浏览文件 @
5a180b58
...
...
@@ -117,7 +117,112 @@ import hashlib
import
re
from
theano.gof.type
import
EnumType
,
Type
from
theano.gof.utils
import
MethodNotDefined
,
c_cpp_keywords
from
theano.gof.utils
import
MethodNotDefined
# Set of C and C++ keywords as defined (at March 2nd, 2017) in the pages below:
# - http://fr.cppreference.com/w/c/keyword
# - http://fr.cppreference.com/w/cpp/keyword
# Added `NULL` and `_Pragma` keywords.
c_cpp_keywords
=
{
"_Alignas"
,
"_Alignof"
,
"_Atomic"
,
"_Bool"
,
"_Complex"
,
"_Generic"
,
"_Imaginary"
,
"_Noreturn"
,
"_Pragma"
,
"_Static_assert"
,
"_Thread_local"
,
"alignas"
,
"alignof"
,
"and"
,
"and_eq"
,
"asm"
,
"auto"
,
"bitand"
,
"bitor"
,
"bool"
,
"break"
,
"case"
,
"catch"
,
"char"
,
"char16_t"
,
"char32_t"
,
"class"
,
"compl"
,
"const"
,
"const_cast"
,
"constexpr"
,
"continue"
,
"decltype"
,
"default"
,
"delete"
,
"do"
,
"double"
,
"dynamic_cast"
,
"else"
,
"enum"
,
"explicit"
,
"export"
,
"extern"
,
"false"
,
"float"
,
"for"
,
"friend"
,
"goto"
,
"if"
,
"inline"
,
"int"
,
"long"
,
"mutable"
,
"namespace"
,
"new"
,
"noexcept"
,
"not"
,
"not_eq"
,
"NULL"
,
"nullptr"
,
"operator"
,
"or"
,
"or_eq"
,
"private"
,
"protected"
,
"public"
,
"register"
,
"reinterpret_cast"
,
"restrict"
,
"return"
,
"short"
,
"signed"
,
"sizeof"
,
"static"
,
"static_assert"
,
"static_cast"
,
"struct"
,
"switch"
,
"template"
,
"this"
,
"thread_local"
,
"throw"
,
"true"
,
"try"
,
"typedef"
,
"typeid"
,
"typename"
,
"union"
,
"unsigned"
,
"using"
,
"virtual"
,
"void"
,
"volatile"
,
"wchar_t"
,
"while"
,
"xor"
,
"xor_eq"
,
}
class
Params
(
dict
):
...
...
theano/gof/utils.py
浏览文件 @
5a180b58
...
...
@@ -482,108 +482,3 @@ def hash_from_file(file_path):
with
open
(
file_path
,
"rb"
)
as
f
:
file_content
=
f
.
read
()
return
hash_from_code
(
file_content
)
# Set of C and C++ keywords as defined (at March 2nd, 2017) in the pages below:
# - http://fr.cppreference.com/w/c/keyword
# - http://fr.cppreference.com/w/cpp/keyword
# Added `NULL` and `_Pragma` keywords.
c_cpp_keywords
=
{
"_Alignas"
,
"_Alignof"
,
"_Atomic"
,
"_Bool"
,
"_Complex"
,
"_Generic"
,
"_Imaginary"
,
"_Noreturn"
,
"_Pragma"
,
"_Static_assert"
,
"_Thread_local"
,
"alignas"
,
"alignof"
,
"and"
,
"and_eq"
,
"asm"
,
"auto"
,
"bitand"
,
"bitor"
,
"bool"
,
"break"
,
"case"
,
"catch"
,
"char"
,
"char16_t"
,
"char32_t"
,
"class"
,
"compl"
,
"const"
,
"const_cast"
,
"constexpr"
,
"continue"
,
"decltype"
,
"default"
,
"delete"
,
"do"
,
"double"
,
"dynamic_cast"
,
"else"
,
"enum"
,
"explicit"
,
"export"
,
"extern"
,
"false"
,
"float"
,
"for"
,
"friend"
,
"goto"
,
"if"
,
"inline"
,
"int"
,
"long"
,
"mutable"
,
"namespace"
,
"new"
,
"noexcept"
,
"not"
,
"not_eq"
,
"NULL"
,
"nullptr"
,
"operator"
,
"or"
,
"or_eq"
,
"private"
,
"protected"
,
"public"
,
"register"
,
"reinterpret_cast"
,
"restrict"
,
"return"
,
"short"
,
"signed"
,
"sizeof"
,
"static"
,
"static_assert"
,
"static_cast"
,
"struct"
,
"switch"
,
"template"
,
"this"
,
"thread_local"
,
"throw"
,
"true"
,
"try"
,
"typedef"
,
"typeid"
,
"typename"
,
"union"
,
"unsigned"
,
"using"
,
"virtual"
,
"void"
,
"volatile"
,
"wchar_t"
,
"while"
,
"xor"
,
"xor_eq"
,
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论