MNN/source/backend/cuda/execution/MNNCUDADefine.hpp

20 lines
585 B
C++
Raw Normal View History

2022-02-18 11:30:27 +08:00
#ifndef MNNCUDADEFINE_HPP
#define MNNCUDADEFINE_HPP
2022-08-12 10:30:48 +08:00
#define PACK_NUMBER 8
2023-02-28 10:41:24 +08:00
#define INT8_PACK_NUMBER 16
2022-02-18 11:30:27 +08:00
#define MNN_CUDA_HALF2_MAX(a, b) \
do { \
(a).x = __hgt((a).x, (b).x) ? (a).x : (b).x; \
(a).y = __hgt((a).y, (b).y) ? (a).y : (b).y; \
} while (0)
#define MNN_CUDA_HALF2_MIN(a, b) \
do { \
(a).x = __hlt((a).x, (b).x) ? (a).x : (b).x; \
(a).y = __hlt((a).y, (b).y) ? (a).y : (b).y; \
} while (0)
#endif