Commit 16ab02c5 by xiaotong

add USE_CUDA to protect the CPU execution

parent 7180a4a3
......@@ -250,7 +250,11 @@ void _SetDataFixedCond(XTensor * tensor, XTensor * condition, DTYPE p)
}
}
else{
#ifdef USE_CUDA
_CudaSetDataFixedCondFloat(tensor, condition, p);
#else
ShowNTErrors("Please specify USE_CUDA and recompile the code");
#endif
}
}
else{
......@@ -283,7 +287,11 @@ void _SetDataFixedCondInt(XTensor * tensor, XTensor * condition, int p)
}
}
else{
#ifdef USE_CUDA
_CudaSetDataFixedCondInt(tensor, condition, p);
#else
ShowNTErrors("Please specify USE_CUDA and recompile the code");
#endif
}
}
else{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论