Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
2638c332
提交
2638c332
authored
1月 31, 2013
作者:
lamblin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1189 from nouiz/win_gpu
WIP: fix compilation problem for GPU on windows.
上级
1daa2d29
7e101c17
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
8 行增加
和
6 行删除
+8
-6
cuda_ndarray.cuh
theano/sandbox/cuda/cuda_ndarray.cuh
+8
-6
没有找到文件。
theano/sandbox/cuda/cuda_ndarray.cuh
浏览文件 @
2638c332
...
@@ -12,8 +12,10 @@
...
@@ -12,8 +12,10 @@
#else
#else
#define DllExport __declspec( dllimport )
#define DllExport __declspec( dllimport )
#endif
#endif
#else
#define ALWAYS_INLINE
#else //else _WIN32
#define DllExport
#define DllExport
#define ALWAYS_INLINE __attribute__((always_inline))
#endif
#endif
typedef
float
real
;
typedef
float
real
;
...
@@ -134,7 +136,7 @@ CudaNdarray_HOST_STRIDES(const CudaNdarray * self);
...
@@ -134,7 +136,7 @@ CudaNdarray_HOST_STRIDES(const CudaNdarray * self);
DllExport
const
int
*
DllExport
const
int
*
CudaNdarray_HOST_LOG2DIMS
(
const
CudaNdarray
*
self
);
CudaNdarray_HOST_LOG2DIMS
(
const
CudaNdarray
*
self
);
DllExport
inline
void
__attribute__
((
always_inline
))
DllExport
inline
void
ALWAYS_INLINE
cnda_mark_dev_structure_dirty
(
CudaNdarray
*
self
)
cnda_mark_dev_structure_dirty
(
CudaNdarray
*
self
)
{
{
self
->
dev_structure_fresh
=
0
;
self
->
dev_structure_fresh
=
0
;
...
@@ -155,7 +157,7 @@ CudaNdarray_Equal(CudaNdarray *cnda1, CudaNdarray *cnda2);
...
@@ -155,7 +157,7 @@ CudaNdarray_Equal(CudaNdarray *cnda1, CudaNdarray *cnda2);
*
*
* Does not sync structure to device.
* Does not sync structure to device.
*/
*/
DllExport
inline
void
__attribute__
((
always_inline
))
DllExport
inline
void
ALWAYS_INLINE
CudaNdarray_set_dim
(
CudaNdarray
*
self
,
int
idx
,
int
d
)
CudaNdarray_set_dim
(
CudaNdarray
*
self
,
int
idx
,
int
d
)
{
{
if
((
idx
>=
self
->
nd
)
||
(
idx
<
0
)
||
(
d
<
0
))
if
((
idx
>=
self
->
nd
)
||
(
idx
<
0
)
||
(
d
<
0
))
...
@@ -173,7 +175,7 @@ CudaNdarray_set_dim(CudaNdarray * self, int idx, int d)
...
@@ -173,7 +175,7 @@ CudaNdarray_set_dim(CudaNdarray * self, int idx, int d)
}
}
DllExport
inline
void
__attribute__
((
always_inline
))
DllExport
inline
void
ALWAYS_INLINE
CudaNdarray_set_stride
(
CudaNdarray
*
self
,
int
idx
,
int
s
)
CudaNdarray_set_stride
(
CudaNdarray
*
self
,
int
idx
,
int
s
)
{
{
if
((
idx
>=
self
->
nd
)
||
(
idx
<
0
))
if
((
idx
>=
self
->
nd
)
||
(
idx
<
0
))
...
@@ -232,7 +234,7 @@ DllExport PyObject * CudaNdarray_new_nd(const int nd);
...
@@ -232,7 +234,7 @@ DllExport PyObject * CudaNdarray_new_nd(const int nd);
* Note: This does not allocate storage for data, or free
* Note: This does not allocate storage for data, or free
* pre-existing storage.
* pre-existing storage.
*/
*/
DllExport
inline
int
__attribute__
((
always_inline
))
DllExport
inline
int
ALWAYS_INLINE
CudaNdarray_set_nd
(
CudaNdarray
*
self
,
const
int
nd
)
CudaNdarray_set_nd
(
CudaNdarray
*
self
,
const
int
nd
)
{
{
if
(
nd
!=
self
->
nd
)
if
(
nd
!=
self
->
nd
)
...
@@ -434,7 +436,7 @@ CudaNdarray_ZEROS(int n, int * dims);
...
@@ -434,7 +436,7 @@ CudaNdarray_ZEROS(int n, int * dims);
/**
/**
* True iff the strides look like [dim[nd-2], dim[nd-3], ... , dim[0], 1]
* True iff the strides look like [dim[nd-2], dim[nd-3], ... , dim[0], 1]
*/
*/
DllExport
inline
bool
__attribute__
((
always_inline
))
DllExport
inline
bool
ALWAYS_INLINE
CudaNdarray_is_c_contiguous
(
const
CudaNdarray
*
self
)
CudaNdarray_is_c_contiguous
(
const
CudaNdarray
*
self
)
{
{
bool
c_contiguous
=
true
;
bool
c_contiguous
=
true
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论