"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "b134f6a8b6b3d75af45a0b918b4006d2a06e0f91"
Commit 3b6c702f authored by Stefan Ivanov's avatar Stefan Ivanov
Browse files

Fix compile-time constant usage with MSVC

parent 89e1c2cb
...@@ -14,27 +14,27 @@ const std::map<std::string, ReductionType> reduce2REDUCE = { ...@@ -14,27 +14,27 @@ const std::map<std::string, ReductionType> reduce2REDUCE = {
[&] { \ [&] { \
switch (reduce2REDUCE.at(reduce)) { \ switch (reduce2REDUCE.at(reduce)) { \
case SUM: { \ case SUM: { \
const ReductionType REDUCE = SUM; \ static constexpr ReductionType REDUCE = SUM; \
return __VA_ARGS__(); \ return __VA_ARGS__(); \
} \ } \
case MEAN: { \ case MEAN: { \
const ReductionType REDUCE = MEAN; \ static constexpr ReductionType REDUCE = MEAN; \
return __VA_ARGS__(); \ return __VA_ARGS__(); \
} \ } \
case MUL: { \ case MUL: { \
const ReductionType REDUCE = MUL; \ static constexpr ReductionType REDUCE = MUL; \
return __VA_ARGS__(); \ return __VA_ARGS__(); \
} \ } \
case DIV: { \ case DIV: { \
const ReductionType REDUCE = DIV; \ static constexpr ReductionType REDUCE = DIV; \
return __VA_ARGS__(); \ return __VA_ARGS__(); \
} \ } \
case MIN: { \ case MIN: { \
const ReductionType REDUCE = MIN; \ static constexpr ReductionType REDUCE = MIN; \
return __VA_ARGS__(); \ return __VA_ARGS__(); \
} \ } \
case MAX: { \ case MAX: { \
const ReductionType REDUCE = MAX; \ static constexpr ReductionType REDUCE = MAX; \
return __VA_ARGS__(); \ return __VA_ARGS__(); \
} \ } \
} \ } \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment