提交 94f1ad79 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix alloc of (size_t)-n

上级 d3a36aed
......@@ -208,10 +208,11 @@ KERNEL void ave_pool3d_kernel(const ga_size nthreads,
#section support_code
// output shape for a given input padded shape, window shape and stride
// We use ssize_t in the max since this is done to avoid negative results.
#define OUTPUT_DIMS(in_dim, ws, st) \
(IGNORE_BORDER ? (in_dim - ws)/st + 1 : \
(st > ws ? (in_dim - 1)/st + 1 : \
std::max<size_t>(0, (in_dim - 1 - ws + st)/st) + 1))
std::max<ssize_t>(0, (in_dim - 1 - ws + st)/st) + 1))
#section support_code_struct
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论