mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge branch 4.x
This commit is contained in:
@@ -179,7 +179,7 @@ ocv_install_3rdparty_licenses(SoftFloat "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/So
|
||||
|
||||
|
||||
# generate data (samples data) config file
|
||||
set(OPENCV_DATA_CONFIG_FILE "${CMAKE_BINARY_DIR}/opencv_data_config.hpp")
|
||||
set(OPENCV_DATA_CONFIG_FILE "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv_data_config.hpp")
|
||||
set(OPENCV_DATA_CONFIG_STR "")
|
||||
|
||||
if(CMAKE_INSTALL_PREFIX)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -230,7 +230,8 @@ enum KmeansFlags {
|
||||
enum ReduceTypes { REDUCE_SUM = 0, //!< the output is the sum of all rows/columns of the matrix.
|
||||
REDUCE_AVG = 1, //!< the output is the mean vector of all rows/columns of the matrix.
|
||||
REDUCE_MAX = 2, //!< the output is the maximum (column/row-wise) of all rows/columns of the matrix.
|
||||
REDUCE_MIN = 3 //!< the output is the minimum (column/row-wise) of all rows/columns of the matrix.
|
||||
REDUCE_MIN = 3, //!< the output is the minimum (column/row-wise) of all rows/columns of the matrix.
|
||||
REDUCE_SUM2 = 4 //!< the output is the sum of all squared rows/columns of the matrix.
|
||||
};
|
||||
|
||||
//! @} core_array
|
||||
@@ -903,7 +904,7 @@ The function #reduce reduces the matrix to a vector by treating the matrix rows/
|
||||
1D vectors and performing the specified operation on the vectors until a single row/column is
|
||||
obtained. For example, the function can be used to compute horizontal and vertical projections of a
|
||||
raster image. In case of #REDUCE_MAX and #REDUCE_MIN , the output image should have the same type as the source one.
|
||||
In case of #REDUCE_SUM and #REDUCE_AVG , the output may have a larger element bit-depth to preserve accuracy.
|
||||
In case of #REDUCE_SUM, #REDUCE_SUM2 and #REDUCE_AVG , the output may have a larger element bit-depth to preserve accuracy.
|
||||
And multi-channel arrays are also supported in these two reduction modes.
|
||||
|
||||
The following code demonstrates its usage for a single channel matrix.
|
||||
|
||||
@@ -567,6 +567,29 @@ The function does not reallocate memory if the matrix has proper attributes alre
|
||||
*/
|
||||
CV_EXPORTS_W void ensureSizeIsEnough(int rows, int cols, int type, OutputArray arr);
|
||||
|
||||
/** @brief Bindings overload to create a GpuMat from existing GPU memory.
|
||||
@param rows Row count.
|
||||
@param cols Column count.
|
||||
@param type Type of the matrix.
|
||||
@param cudaMemoryAddress Address of the allocated GPU memory on the device. This does not allocate matrix data. Instead, it just initializes the matrix header that points to the specified \a cudaMemoryAddress, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it.
|
||||
@param step Number of bytes each matrix row occupies. The value should include the padding bytes at the end of each row, if any. If the parameter is missing (set to Mat::AUTO_STEP ), no padding is assumed and the actual step is calculated as cols*elemSize(). See GpuMat::elemSize.
|
||||
@note Overload for generation of bindings only, not exported or intended for use internally from C++.
|
||||
*/
|
||||
CV_EXPORTS_W GpuMat inline createGpuMatFromCudaMemory(int rows, int cols, int type, size_t cudaMemoryAddress, size_t step = Mat::AUTO_STEP) {
|
||||
return GpuMat(rows, cols, type, reinterpret_cast<void*>(cudaMemoryAddress), step);
|
||||
};
|
||||
|
||||
/** @overload
|
||||
@param size 2D array size: Size(cols, rows). In the Size() constructor, the number of rows and the number of columns go in the reverse order.
|
||||
@param type Type of the matrix.
|
||||
@param cudaMemoryAddress Address of the allocated GPU memory on the device. This does not allocate matrix data. Instead, it just initializes the matrix header that points to the specified \a cudaMemoryAddress, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it.
|
||||
@param step Number of bytes each matrix row occupies. The value should include the padding bytes at the end of each row, if any. If the parameter is missing (set to Mat::AUTO_STEP ), no padding is assumed and the actual step is calculated as cols*elemSize(). See GpuMat::elemSize.
|
||||
@note Overload for generation of bindings only, not exported or intended for use internally from C++.
|
||||
*/
|
||||
CV_EXPORTS_W inline GpuMat createGpuMatFromCudaMemory(Size size, int type, size_t cudaMemoryAddress, size_t step = Mat::AUTO_STEP) {
|
||||
return GpuMat(size, type, reinterpret_cast<void*>(cudaMemoryAddress), step);
|
||||
};
|
||||
|
||||
/** @brief BufferPool for use with CUDA streams
|
||||
|
||||
BufferPool utilizes Stream's allocator to create new buffers for GpuMat's. It is
|
||||
@@ -921,6 +944,13 @@ private:
|
||||
friend class DefaultDeviceInitializer;
|
||||
};
|
||||
|
||||
|
||||
/** @brief Bindings overload to create a Stream object from the address stored in an existing CUDA Runtime API stream pointer (cudaStream_t).
|
||||
@param cudaStreamMemoryAddress Memory address stored in a CUDA Runtime API stream pointer (cudaStream_t). The created Stream object does not perform any allocation or deallocation and simply wraps existing raw CUDA Runtime API stream pointer.
|
||||
@note Overload for generation of bindings only, not exported or intended for use internally from C++.
|
||||
*/
|
||||
CV_EXPORTS_W Stream wrapStream(size_t cudaStreamMemoryAddress);
|
||||
|
||||
class CV_EXPORTS_W Event
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -52,7 +52,9 @@
|
||||
#include "opencv2/core.hpp"
|
||||
|
||||
#if defined _MSC_VER && _MSC_VER >= 1200
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX // fix https://github.com/opencv/opencv/issues/17548
|
||||
#endif
|
||||
#pragma warning( disable: 4714 ) //__forceinline is not inlined
|
||||
#pragma warning( disable: 4127 ) //conditional expression is constant
|
||||
#pragma warning( disable: 4244 ) //conversion from '__int64' to 'int', possible loss of data
|
||||
|
||||
@@ -758,6 +758,36 @@ namespace CV__SIMD_NAMESPACE {
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_float64)
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 16/*128*/ && CV_SIMD128
|
||||
// when we use CV_SIMD128 with 256/512 bit SIMD (e.g. AVX2 or AVX512)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_uint8x16)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_uint16x8)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_uint32x4)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_uint64x2)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_int8x16)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_int16x8)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_int32x4)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_int64x2)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_float32x4)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_float64x2)
|
||||
#endif
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 32/*256*/ && CV_SIMD256
|
||||
// when we use CV_SIMD256 with 512 bit SIMD (e.g. AVX512)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_uint8x32)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_uint16x16)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_uint32x8)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_uint64x4)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_int8x32)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_int16x16)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_int32x8)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_int64x4)
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_float32x8)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_BIN_OP_ADDSUB(v_float64x4)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define OPENCV_HAL_WRAP_BIN_OP_LOGIC(_Tpvec) \
|
||||
inline _Tpvec v_and(const _Tpvec& a, const _Tpvec& b) \
|
||||
@@ -785,6 +815,26 @@ namespace CV__SIMD_NAMESPACE {
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_int16)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_int32)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_int64)
|
||||
#if CV_SIMD_WIDTH != 16/*128*/ && CV_SIMD128
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_uint8x16)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_uint16x8)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_uint32x4)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_uint64x2)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_int8x16)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_int16x8)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_int32x4)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_int64x2)
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 32/*256*/ && CV_SIMD256
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_uint8x32)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_uint16x16)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_uint32x8)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_uint64x4)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_int8x32)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_int16x16)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_int32x8)
|
||||
OPENCV_HAL_WRAP_BIN_OP_LOGIC(v_int64x4)
|
||||
#endif
|
||||
|
||||
#define OPENCV_HAL_WRAP_BIN_OP_MUL(_Tpvec) \
|
||||
inline _Tpvec v_mul(const _Tpvec& a, const _Tpvec& b) \
|
||||
@@ -805,17 +855,51 @@ namespace CV__SIMD_NAMESPACE {
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_float64)
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 16/*128*/ && CV_SIMD128
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_uint8x16)
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_uint16x8)
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_uint32x4)
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_int8x16)
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_int16x8)
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_int32x4)
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_float32x4)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_float64x2)
|
||||
#endif
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 32/*256*/ && CV_SIMD256
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_uint8x32)
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_uint16x16)
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_uint32x8)
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_int8x32)
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_int16x16)
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_int32x8)
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_float32x8)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_BIN_OP_MUL(v_float64x4)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
inline v_float32 v_div(const v_float32& a, const v_float32& b) \
|
||||
#define OPENCV_HAL_WRAP_BIN_OP_DIV(_Tpvec) \
|
||||
inline _Tpvec v_div(const _Tpvec& a, const _Tpvec& b) \
|
||||
{ \
|
||||
return a / b; \
|
||||
}
|
||||
OPENCV_HAL_WRAP_BIN_OP_DIV(v_float32)
|
||||
#if CV_SIMD_64F
|
||||
inline v_float64 v_div(const v_float64& a, const v_float64& b) \
|
||||
{ \
|
||||
return a / b; \
|
||||
}
|
||||
OPENCV_HAL_WRAP_BIN_OP_DIV(v_float64)
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 16/*128*/ && CV_SIMD128
|
||||
OPENCV_HAL_WRAP_BIN_OP_DIV(v_float32x4)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_BIN_OP_DIV(v_float64x2)
|
||||
#endif
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 32/*256*/ && CV_SIMD256
|
||||
OPENCV_HAL_WRAP_BIN_OP_DIV(v_float32x8)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_BIN_OP_DIV(v_float64x4)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define OPENCV_HAL_WRAP_CMP_OP(_Tpvec, intrin, op) \
|
||||
@@ -844,44 +928,124 @@ namespace CV__SIMD_NAMESPACE {
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_CMP(v_float64)
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 16/*128*/ && CV_SIMD128
|
||||
OPENCV_HAL_WRAP_CMP(v_uint8x16)
|
||||
OPENCV_HAL_WRAP_CMP(v_uint16x8)
|
||||
OPENCV_HAL_WRAP_CMP(v_uint32x4)
|
||||
OPENCV_HAL_WRAP_CMP(v_int8x16)
|
||||
OPENCV_HAL_WRAP_CMP(v_int16x8)
|
||||
OPENCV_HAL_WRAP_CMP(v_int32x4)
|
||||
OPENCV_HAL_WRAP_CMP(v_float32x4)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_CMP(v_float64x2)
|
||||
#endif
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 32/*256*/ && CV_SIMD256
|
||||
OPENCV_HAL_WRAP_CMP(v_uint8x32)
|
||||
OPENCV_HAL_WRAP_CMP(v_uint16x16)
|
||||
OPENCV_HAL_WRAP_CMP(v_uint32x8)
|
||||
OPENCV_HAL_WRAP_CMP(v_int8x32)
|
||||
OPENCV_HAL_WRAP_CMP(v_int16x16)
|
||||
OPENCV_HAL_WRAP_CMP(v_int32x8)
|
||||
OPENCV_HAL_WRAP_CMP(v_float32x8)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_CMP(v_float64x4)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//////////// get0 ////////////
|
||||
#define OPENCV_HAL_WRAP_GRT0_INT(_Tpvec, _Tp) \
|
||||
inline _Tp v_get0(const v_##_Tpvec& v) \
|
||||
#define OPENCV_HAL_WRAP_GRT0(_Tpvec) \
|
||||
inline typename VTraits<_Tpvec>::lane_type v_get0(const _Tpvec& v) \
|
||||
{ \
|
||||
return v.get0(); \
|
||||
}
|
||||
|
||||
OPENCV_HAL_WRAP_GRT0_INT(uint8, uchar)
|
||||
OPENCV_HAL_WRAP_GRT0_INT(int8, schar)
|
||||
OPENCV_HAL_WRAP_GRT0_INT(uint16, ushort)
|
||||
OPENCV_HAL_WRAP_GRT0_INT(int16, short)
|
||||
OPENCV_HAL_WRAP_GRT0_INT(uint32, unsigned)
|
||||
OPENCV_HAL_WRAP_GRT0_INT(int32, int)
|
||||
OPENCV_HAL_WRAP_GRT0_INT(uint64, uint64)
|
||||
OPENCV_HAL_WRAP_GRT0_INT(int64, int64)
|
||||
OPENCV_HAL_WRAP_GRT0_INT(float32, float)
|
||||
OPENCV_HAL_WRAP_GRT0(v_uint8)
|
||||
OPENCV_HAL_WRAP_GRT0(v_int8)
|
||||
OPENCV_HAL_WRAP_GRT0(v_uint16)
|
||||
OPENCV_HAL_WRAP_GRT0(v_int16)
|
||||
OPENCV_HAL_WRAP_GRT0(v_uint32)
|
||||
OPENCV_HAL_WRAP_GRT0(v_int32)
|
||||
OPENCV_HAL_WRAP_GRT0(v_uint64)
|
||||
OPENCV_HAL_WRAP_GRT0(v_int64)
|
||||
OPENCV_HAL_WRAP_GRT0(v_float32)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_GRT0_INT(float64, double)
|
||||
OPENCV_HAL_WRAP_GRT0(v_float64)
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 16/*128*/ && CV_SIMD128
|
||||
OPENCV_HAL_WRAP_GRT0(v_uint8x16)
|
||||
OPENCV_HAL_WRAP_GRT0(v_uint16x8)
|
||||
OPENCV_HAL_WRAP_GRT0(v_uint32x4)
|
||||
OPENCV_HAL_WRAP_GRT0(v_uint64x2)
|
||||
OPENCV_HAL_WRAP_GRT0(v_int8x16)
|
||||
OPENCV_HAL_WRAP_GRT0(v_int16x8)
|
||||
OPENCV_HAL_WRAP_GRT0(v_int32x4)
|
||||
OPENCV_HAL_WRAP_GRT0(v_int64x2)
|
||||
OPENCV_HAL_WRAP_GRT0(v_float32x4)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_GRT0(v_float64x2)
|
||||
#endif
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 32/*256*/ && CV_SIMD256
|
||||
OPENCV_HAL_WRAP_GRT0(v_uint8x32)
|
||||
OPENCV_HAL_WRAP_GRT0(v_uint16x16)
|
||||
OPENCV_HAL_WRAP_GRT0(v_uint32x8)
|
||||
OPENCV_HAL_WRAP_GRT0(v_uint64x4)
|
||||
OPENCV_HAL_WRAP_GRT0(v_int8x32)
|
||||
OPENCV_HAL_WRAP_GRT0(v_int16x16)
|
||||
OPENCV_HAL_WRAP_GRT0(v_int32x8)
|
||||
OPENCV_HAL_WRAP_GRT0(v_int64x4)
|
||||
OPENCV_HAL_WRAP_GRT0(v_float32x8)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_GRT0(v_float64x4)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define OPENCV_HAL_WRAP_EXTRACT(_Tpvec, _Tp, vl) \
|
||||
inline _Tp v_extract_highest(const _Tpvec& v) \
|
||||
#define OPENCV_HAL_WRAP_EXTRACT(_Tpvec) \
|
||||
inline typename VTraits<_Tpvec>::lane_type v_extract_highest(const _Tpvec& v) \
|
||||
{ \
|
||||
return v_extract_n<vl-1>(v); \
|
||||
return v_extract_n<VTraits<_Tpvec>::nlanes-1>(v); \
|
||||
}
|
||||
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint8, uchar, VTraits<v_uint8>::nlanes)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int8, schar, VTraits<v_int8>::nlanes)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint16, ushort, VTraits<v_uint16>::nlanes)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int16, short, VTraits<v_int16>::nlanes)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint32, unsigned int, VTraits<v_uint32>::nlanes)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int32, int, VTraits<v_int32>::nlanes)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint64, uint64, VTraits<v_uint64>::nlanes)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int64, int64, VTraits<v_int64>::nlanes)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_float32, float, VTraits<v_float32>::nlanes)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint8)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int8)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint16)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int16)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint32)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int32)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint64)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int64)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_float32)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_float64, double, VTraits<v_float64>::nlanes)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_float64)
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 16/*128*/ && CV_SIMD128
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint8x16)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint16x8)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint32x4)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint64x2)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int8x16)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int16x8)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int32x4)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int64x2)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_float32x4)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_float64x2)
|
||||
#endif
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 32/*256*/ && CV_SIMD256
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint8x32)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint16x16)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint32x8)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_uint64x4)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int8x32)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int16x16)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int32x8)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_int64x4)
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_float32x8)
|
||||
#if CV_SIMD_64F
|
||||
OPENCV_HAL_WRAP_EXTRACT(v_float64x4)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define OPENCV_HAL_WRAP_BROADCAST(_Tpvec) \
|
||||
@@ -893,7 +1057,16 @@ namespace CV__SIMD_NAMESPACE {
|
||||
OPENCV_HAL_WRAP_BROADCAST(v_uint32)
|
||||
OPENCV_HAL_WRAP_BROADCAST(v_int32)
|
||||
OPENCV_HAL_WRAP_BROADCAST(v_float32)
|
||||
|
||||
#if CV_SIMD_WIDTH != 16/*128*/ && CV_SIMD128
|
||||
OPENCV_HAL_WRAP_BROADCAST(v_uint32x4)
|
||||
OPENCV_HAL_WRAP_BROADCAST(v_int32x4)
|
||||
OPENCV_HAL_WRAP_BROADCAST(v_float32x4)
|
||||
#endif
|
||||
#if CV_SIMD_WIDTH != 32/*256*/ && CV_SIMD256
|
||||
OPENCV_HAL_WRAP_BROADCAST(v_uint32x8)
|
||||
OPENCV_HAL_WRAP_BROADCAST(v_int32x8)
|
||||
OPENCV_HAL_WRAP_BROADCAST(v_float32x8)
|
||||
#endif
|
||||
|
||||
#endif //!CV_SIMD_SCALABLE
|
||||
|
||||
|
||||
@@ -880,14 +880,10 @@ OPENCV_HAL_IMPL_CMP_OP(<=)
|
||||
For all types except 64-bit integer values. */
|
||||
OPENCV_HAL_IMPL_CMP_OP(>=)
|
||||
|
||||
/** @brief Equal comparison
|
||||
|
||||
For all types except 64-bit integer values. */
|
||||
/** @brief Equal comparison */
|
||||
OPENCV_HAL_IMPL_CMP_OP(==)
|
||||
|
||||
/** @brief Not equal comparison
|
||||
|
||||
For all types except 64-bit integer values. */
|
||||
/** @brief Not equal comparison */
|
||||
OPENCV_HAL_IMPL_CMP_OP(!=)
|
||||
|
||||
template<int n>
|
||||
|
||||
@@ -1036,18 +1036,6 @@ OPENCV_HAL_IMPL_NEON_BIN_FUNC(v_float64x2, v_min, vminq_f64)
|
||||
OPENCV_HAL_IMPL_NEON_BIN_FUNC(v_float64x2, v_max, vmaxq_f64)
|
||||
#endif
|
||||
|
||||
#if CV_SIMD128_64F
|
||||
inline int64x2_t vmvnq_s64(int64x2_t a)
|
||||
{
|
||||
int64x2_t vx = vreinterpretq_s64_u32(vdupq_n_u32(0xFFFFFFFF));
|
||||
return veorq_s64(a, vx);
|
||||
}
|
||||
inline uint64x2_t vmvnq_u64(uint64x2_t a)
|
||||
{
|
||||
uint64x2_t vx = vreinterpretq_u64_u32(vdupq_n_u32(0xFFFFFFFF));
|
||||
return veorq_u64(a, vx);
|
||||
}
|
||||
#endif
|
||||
#define OPENCV_HAL_IMPL_NEON_INT_CMP_OP(_Tpvec, cast, suffix, not_suffix) \
|
||||
inline _Tpvec operator == (const _Tpvec& a, const _Tpvec& b) \
|
||||
{ return _Tpvec(cast(vceqq_##suffix(a.val, b.val))); } \
|
||||
@@ -1069,9 +1057,47 @@ OPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_int16x8, vreinterpretq_s16_u16, s16, u16)
|
||||
OPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_uint32x4, OPENCV_HAL_NOP, u32, u32)
|
||||
OPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_int32x4, vreinterpretq_s32_u32, s32, u32)
|
||||
OPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_float32x4, vreinterpretq_f32_u32, f32, u32)
|
||||
#if defined(__aarch64__) || defined(_M_ARM64)
|
||||
static inline uint64x2_t vmvnq_u64(uint64x2_t a)
|
||||
{
|
||||
uint64x2_t vx = vreinterpretq_u64_u32(vdupq_n_u32(0xFFFFFFFF));
|
||||
return veorq_u64(a, vx);
|
||||
}
|
||||
//OPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_uint64x2, OPENCV_HAL_NOP, u64, u64)
|
||||
//OPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_int64x2, vreinterpretq_s64_u64, s64, u64)
|
||||
static inline v_uint64x2 operator == (const v_uint64x2& a, const v_uint64x2& b)
|
||||
{ return v_uint64x2(vceqq_u64(a.val, b.val)); }
|
||||
static inline v_uint64x2 operator != (const v_uint64x2& a, const v_uint64x2& b)
|
||||
{ return v_uint64x2(vmvnq_u64(vceqq_u64(a.val, b.val))); }
|
||||
static inline v_int64x2 operator == (const v_int64x2& a, const v_int64x2& b)
|
||||
{ return v_int64x2(vreinterpretq_s64_u64(vceqq_s64(a.val, b.val))); }
|
||||
static inline v_int64x2 operator != (const v_int64x2& a, const v_int64x2& b)
|
||||
{ return v_int64x2(vreinterpretq_s64_u64(vmvnq_u64(vceqq_s64(a.val, b.val)))); }
|
||||
#else
|
||||
static inline v_uint64x2 operator == (const v_uint64x2& a, const v_uint64x2& b)
|
||||
{
|
||||
uint32x4_t cmp = vceqq_u32(vreinterpretq_u32_u64(a.val), vreinterpretq_u32_u64(b.val));
|
||||
uint32x4_t swapped = vrev64q_u32(cmp);
|
||||
return v_uint64x2(vreinterpretq_u64_u32(vandq_u32(cmp, swapped)));
|
||||
}
|
||||
static inline v_uint64x2 operator != (const v_uint64x2& a, const v_uint64x2& b)
|
||||
{
|
||||
uint32x4_t cmp = vceqq_u32(vreinterpretq_u32_u64(a.val), vreinterpretq_u32_u64(b.val));
|
||||
uint32x4_t swapped = vrev64q_u32(cmp);
|
||||
uint64x2_t v_eq = vreinterpretq_u64_u32(vandq_u32(cmp, swapped));
|
||||
uint64x2_t vx = vreinterpretq_u64_u32(vdupq_n_u32(0xFFFFFFFF));
|
||||
return v_uint64x2(veorq_u64(v_eq, vx));
|
||||
}
|
||||
static inline v_int64x2 operator == (const v_int64x2& a, const v_int64x2& b)
|
||||
{
|
||||
return v_reinterpret_as_s64(v_reinterpret_as_u64(a) == v_reinterpret_as_u64(b));
|
||||
}
|
||||
static inline v_int64x2 operator != (const v_int64x2& a, const v_int64x2& b)
|
||||
{
|
||||
return v_reinterpret_as_s64(v_reinterpret_as_u64(a) != v_reinterpret_as_u64(b));
|
||||
}
|
||||
#endif
|
||||
#if CV_SIMD128_64F
|
||||
OPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_uint64x2, OPENCV_HAL_NOP, u64, u64)
|
||||
OPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_int64x2, vreinterpretq_s64_u64, s64, u64)
|
||||
OPENCV_HAL_IMPL_NEON_INT_CMP_OP(v_float64x2, vreinterpretq_f64_u64, f64, u64)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,13 +10,36 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
// RVV intrinsics have been renamed in version 0.11, so we need to include
|
||||
// compatibility headers:
|
||||
// https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/master/auto-generated/rvv-v0p10-compatible-headers
|
||||
#if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic>10999
|
||||
#include "intrin_rvv_010_compat_non-policy.hpp"
|
||||
#include "intrin_rvv_010_compat_overloaded-non-policy.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
// Building for T-Head C906 core with RVV 0.7.1 using toolchain
|
||||
// https://github.com/T-head-Semi/xuantie-gnu-toolchain
|
||||
// with option '-march=rv64gcv0p7'
|
||||
#ifdef __THEAD_VERSION__
|
||||
# if __riscv_v == 7000
|
||||
# include <fenv.h>
|
||||
# define CV_RVV_THEAD_0_7
|
||||
# endif
|
||||
#endif
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
||||
CV_CPU_OPTIMIZATION_HAL_NAMESPACE_BEGIN
|
||||
|
||||
#define CV_SIMD128 1
|
||||
#define CV_SIMD128_64F 1
|
||||
#ifndef CV_RVV_THEAD_0_7
|
||||
# define CV_SIMD128_64F 1
|
||||
#else
|
||||
# define CV_SIMD128_64F 0
|
||||
#endif
|
||||
|
||||
//////////// Unsupported native intrinsics in C++ ////////////
|
||||
// The following types have been defined in clang, but not in GCC yet.
|
||||
@@ -1001,14 +1024,17 @@ OPENCV_HAL_IMPL_RVV_TWO_TIMES_REINTERPRET(uint64x2, float32x4, u64, f32, u, f, 6
|
||||
OPENCV_HAL_IMPL_RVV_TWO_TIMES_REINTERPRET(int8x16, float32x4, s8, f32, i, f, 8, 32)
|
||||
OPENCV_HAL_IMPL_RVV_TWO_TIMES_REINTERPRET(int16x8, float32x4, s16, f32, i, f, 16, 32)
|
||||
OPENCV_HAL_IMPL_RVV_TWO_TIMES_REINTERPRET(int64x2, float32x4, s64, f32, i, f, 64, 32)
|
||||
#if CV_SIMD128_64F
|
||||
OPENCV_HAL_IMPL_RVV_TWO_TIMES_REINTERPRET(uint8x16, float64x2, u8, f64, u, f, 8, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TWO_TIMES_REINTERPRET(uint16x8, float64x2, u16, f64, u, f, 16, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TWO_TIMES_REINTERPRET(uint32x4, float64x2, u32, f64, u, f, 32, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TWO_TIMES_REINTERPRET(int8x16, float64x2, s8, f64, i, f, 8, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TWO_TIMES_REINTERPRET(int16x8, float64x2, s16, f64, i, f, 16, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TWO_TIMES_REINTERPRET(int32x4, float64x2, s32, f64, i, f, 32, 64)
|
||||
#endif
|
||||
|
||||
// Three times reinterpret
|
||||
#if CV_SIMD128_64F
|
||||
inline v_float32x4 v_reinterpret_as_f32(const v_float64x2& v) \
|
||||
{ \
|
||||
return v_float32x4(vreinterpret_v_u32m1_f32m1(vreinterpret_v_u64m1_u32m1(vreinterpret_v_f64m1_u64m1(v))));\
|
||||
@@ -1017,6 +1043,7 @@ inline v_float64x2 v_reinterpret_as_f64(const v_float32x4& v) \
|
||||
{ \
|
||||
return v_float64x2(vreinterpret_v_u64m1_f64m1(vreinterpret_v_u32m1_u64m1(vreinterpret_v_f32m1_u32m1(v))));\
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////// Extract //////////////
|
||||
|
||||
@@ -1920,13 +1947,15 @@ inline v_float64x2 v_muladd(const v_float64x2& a, const v_float64x2& b, const v_
|
||||
#define OPENCV_HAL_IMPL_RVV_CHECK_ALLANY(_Tpvec, suffix, shift, vl) \
|
||||
inline bool v_check_all(const _Tpvec& a) \
|
||||
{ \
|
||||
v_uint64x2 v = v_uint64x2(vreinterpret_v_##suffix##m1_u64m1(vsrl_vx_##suffix##m1(vnot_v_##suffix##m1(a, vl), shift, vl))); \
|
||||
return (v.val[0] | v.val[1]) == 0; \
|
||||
auto v0 = vsrl_vx_##suffix##m1(vnot_v_##suffix##m1(a, vl), shift, vl); \
|
||||
v_uint32x4 v = v_uint32x4(v_reinterpret_as_u32(_Tpvec(v0))); \
|
||||
return (v.val[0] | v.val[1] | v.val[2] | v.val[3]) == 0; \
|
||||
} \
|
||||
inline bool v_check_any(const _Tpvec& a) \
|
||||
{ \
|
||||
v_uint64x2 v = v_uint64x2(vreinterpret_v_##suffix##m1_u64m1(vsrl_vx_##suffix##m1(a, shift, vl))); \
|
||||
return (v.val[0] | v.val[1]) != 0; \
|
||||
auto v0 = vsrl_vx_##suffix##m1(a, shift, vl); \
|
||||
v_uint32x4 v = v_uint32x4(v_reinterpret_as_u32(_Tpvec(v0))); \
|
||||
return (v.val[0] | v.val[1] | v.val[2] | v.val[3]) != 0; \
|
||||
}
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_CHECK_ALLANY(v_uint8x16, u8, 7, 16)
|
||||
@@ -2042,28 +2071,18 @@ OPENCV_HAL_IMPL_RVV_ABSDIFF(v_float64x2, absdiff)
|
||||
OPENCV_HAL_IMPL_RVV_ABSDIFF(v_int8x16, absdiffs)
|
||||
OPENCV_HAL_IMPL_RVV_ABSDIFF(v_int16x8, absdiffs)
|
||||
|
||||
// use reinterpret instead of c-style casting.
|
||||
#ifndef __clang__
|
||||
#define OPENCV_HAL_IMPL_RVV_ABSDIFF_S(_Tpvec, _rTpvec, _nwTpvec, sub, rshr, width, vl) \
|
||||
inline _rTpvec v_absdiff(const _Tpvec& a, const _Tpvec& b) \
|
||||
#define OPENCV_HAL_IMPL_RVV_ABSDIFF_S(ivec, uvec, itype, utype, isuf, usuf, vlen) \
|
||||
inline uvec v_absdiff(const ivec& a, const ivec& b) \
|
||||
{ \
|
||||
return _rTpvec(rshr(vreinterpret_v_i##width##m2_u##width##m2(sub(v_max(a, b), v_min(a, b), vl)), 0, vl)); \
|
||||
itype max = vmax_vv_##isuf(a, b, vlen); \
|
||||
itype min = vmin_vv_##isuf(a, b, vlen); \
|
||||
return uvec(vreinterpret_v_##isuf##_##usuf(vsub_vv_##isuf(max, min, vlen))); \
|
||||
}
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_ABSDIFF_S(v_int8x16, v_uint8x16, vuint16m2_t, vwsub_vv_i16m2, vnclipu_wx_u8m1, 16, 16)
|
||||
OPENCV_HAL_IMPL_RVV_ABSDIFF_S(v_int16x8, v_uint16x8, vuint32m2_t, vwsub_vv_i32m2, vnclipu_wx_u16m1, 32, 8)
|
||||
OPENCV_HAL_IMPL_RVV_ABSDIFF_S(v_int32x4, v_uint32x4, vuint64m2_t, vwsub_vv_i64m2, vnclipu_wx_u32m1, 64, 4)
|
||||
#else
|
||||
#define OPENCV_HAL_IMPL_RVV_ABSDIFF_S(_Tpvec, _rTpvec, _nwTpvec, sub, rshr, width, vl) \
|
||||
inline _rTpvec v_absdiff(const _Tpvec& a, const _Tpvec& b) \
|
||||
{ \
|
||||
return _rTpvec(rshr(vreinterpret_u##width##m2(sub(v_max(a, b), v_min(a, b), vl)), 0, vl)); \
|
||||
}
|
||||
OPENCV_HAL_IMPL_RVV_ABSDIFF_S(v_int8x16, v_uint8x16, vint8m1_t, vuint8m1_t, i8m1, u8m1, 16)
|
||||
OPENCV_HAL_IMPL_RVV_ABSDIFF_S(v_int16x8, v_uint16x8, vint16m1_t, vuint16m1_t, i16m1, u16m1, 8)
|
||||
OPENCV_HAL_IMPL_RVV_ABSDIFF_S(v_int32x4, v_uint32x4, vint32m1_t, vuint32m1_t, i32m1, u32m1, 4)
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_ABSDIFF_S(v_int8x16, v_uint8x16, vuint16m2_t, vwsub_vv_i16m2, vnclipu_wx_u8m1, 16, 16)
|
||||
OPENCV_HAL_IMPL_RVV_ABSDIFF_S(v_int16x8, v_uint16x8, vuint32m2_t, vwsub_vv_i32m2, vnclipu_wx_u16m1, 32, 8)
|
||||
OPENCV_HAL_IMPL_RVV_ABSDIFF_S(v_int32x4, v_uint32x4, vuint64m2_t, vwsub_vv_i64m2, vnclipu_wx_u32m1, 64, 4)
|
||||
#endif
|
||||
#define OPENCV_HAL_IMPL_RVV_ABS(_Tprvec, _Tpvec, suffix) \
|
||||
inline _Tprvec v_abs(const _Tpvec& a) \
|
||||
{ \
|
||||
@@ -2902,7 +2921,14 @@ inline v_int32x4 v_ceil(const v_float32x4& a)
|
||||
|
||||
inline v_int32x4 v_trunc(const v_float32x4& a)
|
||||
{
|
||||
#ifndef CV_RVV_THEAD_0_7
|
||||
return v_int32x4(vfcvt_rtz_x_f_v_i32m1(a, 4));
|
||||
#else
|
||||
const int old_round = fesetround(FE_TOWARDZERO);
|
||||
vint32m1_t val = vfcvt_x_f_v_i32m1(a, 4);
|
||||
fesetround(old_round);
|
||||
return v_int32x4(val);
|
||||
#endif
|
||||
}
|
||||
#if CV_SIMD128_64F
|
||||
#ifndef __clang__
|
||||
@@ -2938,7 +2964,14 @@ inline v_int32x4 v_trunc(const v_float64x2& a)
|
||||
{
|
||||
double arr[4] = {a.val[0], a.val[1], 0, 0};
|
||||
vfloat64m2_t tmp = vle64_v_f64m2(arr, 4);
|
||||
#ifndef CV_RVV_THEAD_0_7
|
||||
return v_int32x4(vfncvt_rtz_x_f_w_i32m1(tmp, 4));
|
||||
#else
|
||||
const int old_round = fesetround(FE_TOWARDZERO);
|
||||
vint32m1_t val = vfncvt_x_f_w_i32m1(tmp, 4);
|
||||
fesetround(old_round);
|
||||
return v_int32x4(val);
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace cv
|
||||
CV_CPU_OPTIMIZATION_HAL_NAMESPACE_BEGIN
|
||||
|
||||
#define CV_SIMD128 1
|
||||
#define CV_SIMD128_64F 1
|
||||
#define CV_SIMD128_64F 0
|
||||
//////////// Types ////////////
|
||||
struct v_uint8x16
|
||||
{
|
||||
@@ -291,14 +291,14 @@ OPENCV_HAL_IMPL_RISCVV_BIN_OPN(+, v_uint16x8, vsaddu_vv_u16m1, 8)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(-, v_uint16x8, vssubu_vv_u16m1, 8)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(+, v_int16x8, vsadd_vv_i16m1, 8)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(-, v_int16x8, vssub_vv_i16m1, 8)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(+, v_int32x4, vsadd_vv_i32m1, 4)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(-, v_int32x4, vssub_vv_i32m1, 4)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(+, v_int32x4, vadd_vv_i32m1, 4)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(-, v_int32x4, vsub_vv_i32m1, 4)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(*, v_int32x4, vmul_vv_i32m1, 4)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(+, v_uint32x4, vadd_vv_u32m1, 4)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(-, v_uint32x4, vsub_vv_u32m1, 4)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(*, v_uint32x4, vmul_vv_u32m1, 4)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(+, v_int64x2, vsadd_vv_i64m1, 2)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(-, v_int64x2, vssub_vv_i64m1, 2)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(+, v_int64x2, vadd_vv_i64m1, 2)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(-, v_int64x2, vsub_vv_i64m1, 2)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(+, v_uint64x2, vadd_vv_u64m1, 2)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(-, v_uint64x2, vsub_vv_u64m1, 2)
|
||||
OPENCV_HAL_IMPL_RISCVV_BIN_OPN(+, v_float32x4, vfadd_vv_f32m1, 4)
|
||||
@@ -1909,14 +1909,14 @@ else return trailingZeros32(val); }
|
||||
inline bool v_check_all(const v_##_Tpvec& a) \
|
||||
{ \
|
||||
suffix##m1_t v0 = vsrl_vx_##_T(vnot_v_##_T(a.val, num), shift, num); \
|
||||
vuint64m1_t v1 = vuint64m1_t(v0); \
|
||||
return (v1[0] | v1[1]) == 0; \
|
||||
vuint32m1_t v1 = vuint32m1_t(v0); \
|
||||
return (v1[0] | v1[1] | v1[2] | v1[3]) == 0; \
|
||||
} \
|
||||
inline bool v_check_any(const v_##_Tpvec& a) \
|
||||
{ \
|
||||
suffix##m1_t v0 = vsrl_vx_##_T(a.val, shift, num); \
|
||||
vuint64m1_t v1 = vuint64m1_t(v0); \
|
||||
return (v1[0] | v1[1]) != 0; \
|
||||
vuint32m1_t v1 = vuint32m1_t(v0); \
|
||||
return (v1[0] | v1[1] | v1[2] | v1[3]) != 0; \
|
||||
}
|
||||
|
||||
OPENCV_HAL_IMPL_RISCVV_CHECK_ALLANY(uint8x16, vuint8, u8m1, 7, 16)
|
||||
@@ -2021,23 +2021,18 @@ inline v_int32x4 v_load_expand_q(const schar* ptr)
|
||||
c = vwadd_vv_i32m2(vget_i16m2_i16m1(b, 0), vmv_v_x_i16m1(0, 4), 4); \
|
||||
return v_int32x4(vget_i32m2_i32m1(c, 0));
|
||||
}
|
||||
#define VITL_16 (vuint64m2_t){0x1303120211011000, 0x1707160615051404, 0x1B0B1A0A19091808, 0x1F0F1E0E1D0D1C0C}
|
||||
#define VITL_8 (vuint64m2_t){0x0009000100080000, 0x000B0003000A0002, 0x000D0005000C0004, 0x000F0007000E0006}
|
||||
#define VITL_4 (vuint64m2_t){0x0000000400000000, 0x0000000500000001, 0x0000000600000002, 0x0000000700000003}
|
||||
#define VITL_2 (vuint64m2_t){0, 2, 1, 3}
|
||||
#define LOW_4 0x0000000100000000, 0x0000000500000004
|
||||
#define LOW_8 0x0003000200010000, 0x000B000A00090008
|
||||
#define LOW_16 0x0706050403020100, 0x1716151413121110
|
||||
#define HIGH_4 0x0000000300000002, 0x0000000700000006
|
||||
#define HIGH_8 0x0007000600050004, 0x000F000E000D000C
|
||||
#define HIGH_16 0x0F0E0D0C0B0A0908, 0x1F1E1D1C1B1A1918
|
||||
#define VITL_16 (vuint32m2_t){0x11011000, 0x13031202, 0x15051404, 0x17071606, 0x19091808, 0x1B0B1A0A, 0x1D0D1C0C, 0x1F0F1E0E}
|
||||
#define VITL_8 (vuint32m2_t){0x00080000, 0x00090001, 0x000A0002, 0x000B0003, 0x000C0004, 0x000D0005, 0x000E0006, 0x000F0007}
|
||||
#define VITL_4 (vuint32m2_t){0x00000000, 0x00000004, 0x00000001, 0x00000005, 0x00000002, 0x00000006, 0x00000003, 0x00000007}
|
||||
#define VITL_2 (vuint32m2_t){0, 0, 2, 0, 1, 0, 3, 0}
|
||||
|
||||
#define OPENCV_HAL_IMPL_RISCVV_UNPACKS(_Tpvec, _Tp, _T, _UTp, _UT, num, num2, len, numh) \
|
||||
inline void v_zip(const v_##_Tpvec& a0, const v_##_Tpvec& a1, v_##_Tpvec& b0, v_##_Tpvec& b1) \
|
||||
{ \
|
||||
v##_Tp##m2_t tmp = vundefined_##_T##m2();\
|
||||
tmp = vset_##_T##m2(tmp, 0, a0.val); \
|
||||
tmp = vset_##_T##m2(tmp, 1, a1.val); \
|
||||
vuint64m2_t mask = VITL_##num; \
|
||||
vuint32m2_t mask = VITL_##num; \
|
||||
tmp = (v##_Tp##m2_t)vrgather_vv_##_T##m2((v##_Tp##m2_t)tmp, (v##_UTp##m2_t)mask, num2); \
|
||||
b0.val = vget_##_T##m2_##_T##m1(tmp, 0); \
|
||||
b1.val = vget_##_T##m2_##_T##m1(tmp, 1); \
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+768
@@ -0,0 +1,768 @@
|
||||
// This file is part of OpenCV project.
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
|
||||
// Copied from
|
||||
// https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/master/auto-generated/rvv-v0p10-compatible-headers
|
||||
|
||||
#ifndef __RVV_0P10_COMPATIBLE_HEADERS_OVERLOADED_NON_POLICY_H
|
||||
#define __RVV_0P10_COMPATIBLE_HEADERS_OVERLOADED_NON_POLICY_H
|
||||
|
||||
|
||||
// The maximum number of parameters is 20, this is held by segment load
|
||||
// instructions with a NFIELD (NF) of 8. 20 is contributed by 8 vector register
|
||||
// pointers passed, 1 vector mask register, 8 passthrough register for
|
||||
// undisturbed policy, and 3 for address base, byte index, vl.
|
||||
#define _GET_OVERRIDE(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13,\
|
||||
_14, _15, _16, _17, _18, _19, _20, NAME, ...) NAME
|
||||
|
||||
|
||||
#if __has_include ("riscv_vector.h")
|
||||
#include <riscv_vector.h>
|
||||
#endif
|
||||
#ifndef __RISCV_VECTOR_H
|
||||
#include_next <riscv_vector.h>
|
||||
#endif
|
||||
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
#define vmerge(mask, op1, op2, vl) __riscv_vmerge((op1), (op2), (mask), (vl))
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
#define vfmerge(mask, op1, op2, vl) __riscv_vfmerge((op1), (op2), (mask), (vl))
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
// masked functions
|
||||
#define vcompress(mask, dest, src, vl) __riscv_vcompress_tu((dest), (src), (mask), (vl))
|
||||
// Reinterpret between different type under the same SEW/LMUL
|
||||
// Reinterpret between different SEW under the same LMUL
|
||||
#define vse16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vse16, __riscv_vse16, 2, 1)(__VA_ARGS__)
|
||||
#define vse32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vse32, __riscv_vse32, 2, 1)(__VA_ARGS__)
|
||||
#define vse64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vse64, __riscv_vse64, 2, 1)(__VA_ARGS__)
|
||||
#define vse8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vse8, __riscv_vse8, 2, 1)(__VA_ARGS__)
|
||||
#define vsse16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsse16, __riscv_vsse16, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsse32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsse32, __riscv_vsse32, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsse64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsse64, __riscv_vsse64, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsse8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsse8, __riscv_vsse8, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vloxei8_tumu, 4, __riscv_vloxei8, 2, 1)(__VA_ARGS__)
|
||||
#define vloxei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vloxei16_tumu, 4, __riscv_vloxei16, 2, 1)(__VA_ARGS__)
|
||||
#define vloxei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vloxei32_tumu, 4, __riscv_vloxei32, 2, 1)(__VA_ARGS__)
|
||||
#define vloxei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vloxei64_tumu, 4, __riscv_vloxei64, 2, 1)(__VA_ARGS__)
|
||||
#define vluxei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vluxei8_tumu, 4, __riscv_vluxei8, 2, 1)(__VA_ARGS__)
|
||||
#define vluxei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vluxei16_tumu, 4, __riscv_vluxei16, 2, 1)(__VA_ARGS__)
|
||||
#define vluxei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vluxei32_tumu, 4, __riscv_vluxei32, 2, 1)(__VA_ARGS__)
|
||||
#define vluxei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vluxei64_tumu, 4, __riscv_vluxei64, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsoxei8, __riscv_vsoxei8, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsoxei16, __riscv_vsoxei16, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsoxei32, __riscv_vsoxei32, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsoxei64, __riscv_vsoxei64, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsuxei8, __riscv_vsuxei8, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsuxei16, __riscv_vsuxei16, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsuxei32, __riscv_vsuxei32, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsuxei64, __riscv_vsuxei64, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg2e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsseg2e16, __riscv_vsseg2e16, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg3e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vsseg3e16, __riscv_vsseg3e16, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg4e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vsseg4e16, __riscv_vsseg4e16, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg5e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vsseg5e16, __riscv_vsseg5e16, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg6e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vsseg6e16, __riscv_vsseg6e16, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg7e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vsseg7e16, __riscv_vsseg7e16, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg8e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vsseg8e16, __riscv_vsseg8e16, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg2e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsseg2e32, __riscv_vsseg2e32, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg3e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vsseg3e32, __riscv_vsseg3e32, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg4e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vsseg4e32, __riscv_vsseg4e32, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg5e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vsseg5e32, __riscv_vsseg5e32, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg6e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vsseg6e32, __riscv_vsseg6e32, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg7e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vsseg7e32, __riscv_vsseg7e32, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg8e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vsseg8e32, __riscv_vsseg8e32, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg2e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsseg2e64, __riscv_vsseg2e64, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg3e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vsseg3e64, __riscv_vsseg3e64, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg4e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vsseg4e64, __riscv_vsseg4e64, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg5e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vsseg5e64, __riscv_vsseg5e64, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg6e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vsseg6e64, __riscv_vsseg6e64, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg7e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vsseg7e64, __riscv_vsseg7e64, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg8e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vsseg8e64, __riscv_vsseg8e64, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg2e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsseg2e8, __riscv_vsseg2e8, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg3e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vsseg3e8, __riscv_vsseg3e8, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg4e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vsseg4e8, __riscv_vsseg4e8, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg5e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vsseg5e8, __riscv_vsseg5e8, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg6e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vsseg6e8, __riscv_vsseg6e8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg7e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vsseg7e8, __riscv_vsseg7e8, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsseg8e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vsseg8e8, __riscv_vsseg8e8, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg2e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vssseg2e16, __riscv_vssseg2e16, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg3e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vssseg3e16, __riscv_vssseg3e16, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg4e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vssseg4e16, __riscv_vssseg4e16, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg5e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vssseg5e16, __riscv_vssseg5e16, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg6e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vssseg6e16, __riscv_vssseg6e16, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg7e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vssseg7e16, __riscv_vssseg7e16, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg8e16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vssseg8e16, __riscv_vssseg8e16, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg2e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vssseg2e32, __riscv_vssseg2e32, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg3e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vssseg3e32, __riscv_vssseg3e32, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg4e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vssseg4e32, __riscv_vssseg4e32, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg5e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vssseg5e32, __riscv_vssseg5e32, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg6e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vssseg6e32, __riscv_vssseg6e32, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg7e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vssseg7e32, __riscv_vssseg7e32, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg8e32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vssseg8e32, __riscv_vssseg8e32, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg2e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vssseg2e64, __riscv_vssseg2e64, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg3e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vssseg3e64, __riscv_vssseg3e64, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg4e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vssseg4e64, __riscv_vssseg4e64, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg5e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vssseg5e64, __riscv_vssseg5e64, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg6e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vssseg6e64, __riscv_vssseg6e64, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg7e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vssseg7e64, __riscv_vssseg7e64, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg8e64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vssseg8e64, __riscv_vssseg8e64, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg2e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vssseg2e8, __riscv_vssseg2e8, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg3e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vssseg3e8, __riscv_vssseg3e8, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg4e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vssseg4e8, __riscv_vssseg4e8, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg5e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vssseg5e8, __riscv_vssseg5e8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg6e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vssseg6e8, __riscv_vssseg6e8, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg7e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vssseg7e8, __riscv_vssseg7e8, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vssseg8e8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vssseg8e8, __riscv_vssseg8e8, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg2ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vloxseg2ei8_tumu, 7, 6, __riscv_vloxseg2ei8, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg3ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vloxseg3ei8_tumu, 9, 8, 7, __riscv_vloxseg3ei8, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg4ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vloxseg4ei8_tumu, 11, 10, 9, 8, __riscv_vloxseg4ei8, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg5ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, __riscv_vloxseg5ei8_tumu, 13, 12, 11, 10, 9, __riscv_vloxseg5ei8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg6ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, __riscv_vloxseg6ei8_tumu, 15, 14, 13, 12, 11, 10, __riscv_vloxseg6ei8, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg7ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, __riscv_vloxseg7ei8_tumu, 17, 16, 15, 14, 13, 12, 11, __riscv_vloxseg7ei8, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg8ei8(...) _GET_OVERRIDE(__VA_ARGS__, __riscv_vloxseg8ei8_tumu, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vloxseg8ei8, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg2ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vloxseg2ei16_tumu, 7, 6, __riscv_vloxseg2ei16, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg3ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vloxseg3ei16_tumu, 9, 8, 7, __riscv_vloxseg3ei16, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg4ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vloxseg4ei16_tumu, 11, 10, 9, 8, __riscv_vloxseg4ei16, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg5ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, __riscv_vloxseg5ei16_tumu, 13, 12, 11, 10, 9, __riscv_vloxseg5ei16, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg6ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, __riscv_vloxseg6ei16_tumu, 15, 14, 13, 12, 11, 10, __riscv_vloxseg6ei16, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg7ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, __riscv_vloxseg7ei16_tumu, 17, 16, 15, 14, 13, 12, 11, __riscv_vloxseg7ei16, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg8ei16(...) _GET_OVERRIDE(__VA_ARGS__, __riscv_vloxseg8ei16_tumu, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vloxseg8ei16, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg2ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vloxseg2ei32_tumu, 7, 6, __riscv_vloxseg2ei32, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg3ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vloxseg3ei32_tumu, 9, 8, 7, __riscv_vloxseg3ei32, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg4ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vloxseg4ei32_tumu, 11, 10, 9, 8, __riscv_vloxseg4ei32, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg5ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, __riscv_vloxseg5ei32_tumu, 13, 12, 11, 10, 9, __riscv_vloxseg5ei32, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg6ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, __riscv_vloxseg6ei32_tumu, 15, 14, 13, 12, 11, 10, __riscv_vloxseg6ei32, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg7ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, __riscv_vloxseg7ei32_tumu, 17, 16, 15, 14, 13, 12, 11, __riscv_vloxseg7ei32, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg8ei32(...) _GET_OVERRIDE(__VA_ARGS__, __riscv_vloxseg8ei32_tumu, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vloxseg8ei32, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg2ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vloxseg2ei64_tumu, 7, 6, __riscv_vloxseg2ei64, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg3ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vloxseg3ei64_tumu, 9, 8, 7, __riscv_vloxseg3ei64, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg4ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vloxseg4ei64_tumu, 11, 10, 9, 8, __riscv_vloxseg4ei64, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg5ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, __riscv_vloxseg5ei64_tumu, 13, 12, 11, 10, 9, __riscv_vloxseg5ei64, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg6ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, __riscv_vloxseg6ei64_tumu, 15, 14, 13, 12, 11, 10, __riscv_vloxseg6ei64, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg7ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, __riscv_vloxseg7ei64_tumu, 17, 16, 15, 14, 13, 12, 11, __riscv_vloxseg7ei64, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vloxseg8ei64(...) _GET_OVERRIDE(__VA_ARGS__, __riscv_vloxseg8ei64_tumu, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vloxseg8ei64, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg2ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vluxseg2ei8_tumu, 7, 6, __riscv_vluxseg2ei8, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg3ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vluxseg3ei8_tumu, 9, 8, 7, __riscv_vluxseg3ei8, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg4ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vluxseg4ei8_tumu, 11, 10, 9, 8, __riscv_vluxseg4ei8, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg5ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, __riscv_vluxseg5ei8_tumu, 13, 12, 11, 10, 9, __riscv_vluxseg5ei8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg6ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, __riscv_vluxseg6ei8_tumu, 15, 14, 13, 12, 11, 10, __riscv_vluxseg6ei8, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg7ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, __riscv_vluxseg7ei8_tumu, 17, 16, 15, 14, 13, 12, 11, __riscv_vluxseg7ei8, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg8ei8(...) _GET_OVERRIDE(__VA_ARGS__, __riscv_vluxseg8ei8_tumu, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vluxseg8ei8, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg2ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vluxseg2ei16_tumu, 7, 6, __riscv_vluxseg2ei16, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg3ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vluxseg3ei16_tumu, 9, 8, 7, __riscv_vluxseg3ei16, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg4ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vluxseg4ei16_tumu, 11, 10, 9, 8, __riscv_vluxseg4ei16, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg5ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, __riscv_vluxseg5ei16_tumu, 13, 12, 11, 10, 9, __riscv_vluxseg5ei16, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg6ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, __riscv_vluxseg6ei16_tumu, 15, 14, 13, 12, 11, 10, __riscv_vluxseg6ei16, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg7ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, __riscv_vluxseg7ei16_tumu, 17, 16, 15, 14, 13, 12, 11, __riscv_vluxseg7ei16, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg8ei16(...) _GET_OVERRIDE(__VA_ARGS__, __riscv_vluxseg8ei16_tumu, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vluxseg8ei16, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg2ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vluxseg2ei32_tumu, 7, 6, __riscv_vluxseg2ei32, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg3ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vluxseg3ei32_tumu, 9, 8, 7, __riscv_vluxseg3ei32, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg4ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vluxseg4ei32_tumu, 11, 10, 9, 8, __riscv_vluxseg4ei32, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg5ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, __riscv_vluxseg5ei32_tumu, 13, 12, 11, 10, 9, __riscv_vluxseg5ei32, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg6ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, __riscv_vluxseg6ei32_tumu, 15, 14, 13, 12, 11, 10, __riscv_vluxseg6ei32, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg7ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, __riscv_vluxseg7ei32_tumu, 17, 16, 15, 14, 13, 12, 11, __riscv_vluxseg7ei32, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg8ei32(...) _GET_OVERRIDE(__VA_ARGS__, __riscv_vluxseg8ei32_tumu, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vluxseg8ei32, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg2ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vluxseg2ei64_tumu, 7, 6, __riscv_vluxseg2ei64, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg3ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vluxseg3ei64_tumu, 9, 8, 7, __riscv_vluxseg3ei64, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg4ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vluxseg4ei64_tumu, 11, 10, 9, 8, __riscv_vluxseg4ei64, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg5ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, __riscv_vluxseg5ei64_tumu, 13, 12, 11, 10, 9, __riscv_vluxseg5ei64, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg6ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, __riscv_vluxseg6ei64_tumu, 15, 14, 13, 12, 11, 10, __riscv_vluxseg6ei64, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg7ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, __riscv_vluxseg7ei64_tumu, 17, 16, 15, 14, 13, 12, 11, __riscv_vluxseg7ei64, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vluxseg8ei64(...) _GET_OVERRIDE(__VA_ARGS__, __riscv_vluxseg8ei64_tumu, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vluxseg8ei64, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg2ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vsoxseg2ei8, __riscv_vsoxseg2ei8, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg3ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vsoxseg3ei8, __riscv_vsoxseg3ei8, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg4ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vsoxseg4ei8, __riscv_vsoxseg4ei8, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg5ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vsoxseg5ei8, __riscv_vsoxseg5ei8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg6ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vsoxseg6ei8, __riscv_vsoxseg6ei8, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg7ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vsoxseg7ei8, __riscv_vsoxseg7ei8, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg8ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vsoxseg8ei8, __riscv_vsoxseg8ei8, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg2ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vsoxseg2ei16, __riscv_vsoxseg2ei16, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg3ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vsoxseg3ei16, __riscv_vsoxseg3ei16, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg4ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vsoxseg4ei16, __riscv_vsoxseg4ei16, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg5ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vsoxseg5ei16, __riscv_vsoxseg5ei16, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg6ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vsoxseg6ei16, __riscv_vsoxseg6ei16, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg7ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vsoxseg7ei16, __riscv_vsoxseg7ei16, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg8ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vsoxseg8ei16, __riscv_vsoxseg8ei16, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg2ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vsoxseg2ei32, __riscv_vsoxseg2ei32, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg3ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vsoxseg3ei32, __riscv_vsoxseg3ei32, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg4ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vsoxseg4ei32, __riscv_vsoxseg4ei32, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg5ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vsoxseg5ei32, __riscv_vsoxseg5ei32, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg6ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vsoxseg6ei32, __riscv_vsoxseg6ei32, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg7ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vsoxseg7ei32, __riscv_vsoxseg7ei32, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg8ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vsoxseg8ei32, __riscv_vsoxseg8ei32, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg2ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vsoxseg2ei64, __riscv_vsoxseg2ei64, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg3ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vsoxseg3ei64, __riscv_vsoxseg3ei64, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg4ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vsoxseg4ei64, __riscv_vsoxseg4ei64, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg5ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vsoxseg5ei64, __riscv_vsoxseg5ei64, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg6ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vsoxseg6ei64, __riscv_vsoxseg6ei64, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg7ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vsoxseg7ei64, __riscv_vsoxseg7ei64, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsoxseg8ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vsoxseg8ei64, __riscv_vsoxseg8ei64, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg2ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vsuxseg2ei8, __riscv_vsuxseg2ei8, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg3ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vsuxseg3ei8, __riscv_vsuxseg3ei8, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg4ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vsuxseg4ei8, __riscv_vsuxseg4ei8, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg5ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vsuxseg5ei8, __riscv_vsuxseg5ei8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg6ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vsuxseg6ei8, __riscv_vsuxseg6ei8, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg7ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vsuxseg7ei8, __riscv_vsuxseg7ei8, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg8ei8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vsuxseg8ei8, __riscv_vsuxseg8ei8, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg2ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vsuxseg2ei16, __riscv_vsuxseg2ei16, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg3ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vsuxseg3ei16, __riscv_vsuxseg3ei16, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg4ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vsuxseg4ei16, __riscv_vsuxseg4ei16, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg5ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vsuxseg5ei16, __riscv_vsuxseg5ei16, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg6ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vsuxseg6ei16, __riscv_vsuxseg6ei16, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg7ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vsuxseg7ei16, __riscv_vsuxseg7ei16, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg8ei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vsuxseg8ei16, __riscv_vsuxseg8ei16, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg2ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vsuxseg2ei32, __riscv_vsuxseg2ei32, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg3ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vsuxseg3ei32, __riscv_vsuxseg3ei32, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg4ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vsuxseg4ei32, __riscv_vsuxseg4ei32, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg5ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vsuxseg5ei32, __riscv_vsuxseg5ei32, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg6ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vsuxseg6ei32, __riscv_vsuxseg6ei32, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg7ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vsuxseg7ei32, __riscv_vsuxseg7ei32, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg8ei32(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vsuxseg8ei32, __riscv_vsuxseg8ei32, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg2ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, __riscv_vsuxseg2ei64, __riscv_vsuxseg2ei64, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg3ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __riscv_vsuxseg3ei64, __riscv_vsuxseg3ei64, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg4ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, __riscv_vsuxseg4ei64, __riscv_vsuxseg4ei64, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg5ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, __riscv_vsuxseg5ei64, __riscv_vsuxseg5ei64, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg6ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, __riscv_vsuxseg6ei64, __riscv_vsuxseg6ei64, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg7ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, __riscv_vsuxseg7ei64, __riscv_vsuxseg7ei64, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsuxseg8ei64(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, __riscv_vsuxseg8ei64, __riscv_vsuxseg8ei64, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vadd(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vadd_tumu, 4, __riscv_vadd, 2, 1)(__VA_ARGS__)
|
||||
#define vsub(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsub_tumu, 4, __riscv_vsub, 2, 1)(__VA_ARGS__)
|
||||
#define vrsub(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vrsub_tumu, 4, __riscv_vrsub, 2, 1)(__VA_ARGS__)
|
||||
#define vneg(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vneg_tumu, 3, __riscv_vneg, 1)(__VA_ARGS__)
|
||||
#define vwadd_vv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwadd_vv_tumu, 4, __riscv_vwadd_vv, 2, 1)(__VA_ARGS__)
|
||||
#define vwadd_vx(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwadd_vx_tumu, 4, __riscv_vwadd_vx, 2, 1)(__VA_ARGS__)
|
||||
#define vwadd_wv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwadd_wv_tumu, 4, __riscv_vwadd_wv, 2, 1)(__VA_ARGS__)
|
||||
#define vwadd_wx(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwadd_wx_tumu, 4, __riscv_vwadd_wx, 2, 1)(__VA_ARGS__)
|
||||
#define vwsub_vv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwsub_vv_tumu, 4, __riscv_vwsub_vv, 2, 1)(__VA_ARGS__)
|
||||
#define vwsub_vx(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwsub_vx_tumu, 4, __riscv_vwsub_vx, 2, 1)(__VA_ARGS__)
|
||||
#define vwsub_wv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwsub_wv_tumu, 4, __riscv_vwsub_wv, 2, 1)(__VA_ARGS__)
|
||||
#define vwsub_wx(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwsub_wx_tumu, 4, __riscv_vwsub_wx, 2, 1)(__VA_ARGS__)
|
||||
#define vwaddu_vv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwaddu_vv_tumu, 4, __riscv_vwaddu_vv, 2, 1)(__VA_ARGS__)
|
||||
#define vwaddu_vx(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwaddu_vx_tumu, 4, __riscv_vwaddu_vx, 2, 1)(__VA_ARGS__)
|
||||
#define vwaddu_wv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwaddu_wv_tumu, 4, __riscv_vwaddu_wv, 2, 1)(__VA_ARGS__)
|
||||
#define vwaddu_wx(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwaddu_wx_tumu, 4, __riscv_vwaddu_wx, 2, 1)(__VA_ARGS__)
|
||||
#define vwsubu_vv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwsubu_vv_tumu, 4, __riscv_vwsubu_vv, 2, 1)(__VA_ARGS__)
|
||||
#define vwsubu_vx(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwsubu_vx_tumu, 4, __riscv_vwsubu_vx, 2, 1)(__VA_ARGS__)
|
||||
#define vwsubu_wv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwsubu_wv_tumu, 4, __riscv_vwsubu_wv, 2, 1)(__VA_ARGS__)
|
||||
#define vwsubu_wx(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwsubu_wx_tumu, 4, __riscv_vwsubu_wx, 2, 1)(__VA_ARGS__)
|
||||
#define vsext_vf2(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vsext_vf2_tumu, 3, __riscv_vsext_vf2, 1)(__VA_ARGS__)
|
||||
#define vsext_vf4(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vsext_vf4_tumu, 3, __riscv_vsext_vf4, 1)(__VA_ARGS__)
|
||||
#define vsext_vf8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vsext_vf8_tumu, 3, __riscv_vsext_vf8, 1)(__VA_ARGS__)
|
||||
#define vzext_vf2(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vzext_vf2_tumu, 3, __riscv_vzext_vf2, 1)(__VA_ARGS__)
|
||||
#define vzext_vf4(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vzext_vf4_tumu, 3, __riscv_vzext_vf4, 1)(__VA_ARGS__)
|
||||
#define vzext_vf8(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vzext_vf8_tumu, 3, __riscv_vzext_vf8, 1)(__VA_ARGS__)
|
||||
#define vadc(...) __riscv_vadc(__VA_ARGS__)
|
||||
#define vsbc(...) __riscv_vsbc(__VA_ARGS__)
|
||||
#define vmadc(...) __riscv_vmadc(__VA_ARGS__)
|
||||
#define vmsbc(...) __riscv_vmsbc(__VA_ARGS__)
|
||||
#define vand(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vand_tumu, 4, __riscv_vand, 2, 1)(__VA_ARGS__)
|
||||
#define vor(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vor_tumu, 4, __riscv_vor, 2, 1)(__VA_ARGS__)
|
||||
#define vxor(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vxor_tumu, 4, __riscv_vxor, 2, 1)(__VA_ARGS__)
|
||||
#define vnot(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vnot_tumu, 3, __riscv_vnot, 1)(__VA_ARGS__)
|
||||
#define vsll(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsll_tumu, 4, __riscv_vsll, 2, 1)(__VA_ARGS__)
|
||||
#define vsra(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsra_tumu, 4, __riscv_vsra, 2, 1)(__VA_ARGS__)
|
||||
#define vsrl(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsrl_tumu, 4, __riscv_vsrl, 2, 1)(__VA_ARGS__)
|
||||
#define vnsra(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vnsra_tumu, 4, __riscv_vnsra, 2, 1)(__VA_ARGS__)
|
||||
#define vnsrl(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vnsrl_tumu, 4, __riscv_vnsrl, 2, 1)(__VA_ARGS__)
|
||||
#define vmseq(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmseq_mu, 4, __riscv_vmseq, 2, 1)(__VA_ARGS__)
|
||||
#define vmsne(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmsne_mu, 4, __riscv_vmsne, 2, 1)(__VA_ARGS__)
|
||||
#define vmslt(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmslt_mu, 4, __riscv_vmslt, 2, 1)(__VA_ARGS__)
|
||||
#define vmsle(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmsle_mu, 4, __riscv_vmsle, 2, 1)(__VA_ARGS__)
|
||||
#define vmsgt(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmsgt_mu, 4, __riscv_vmsgt, 2, 1)(__VA_ARGS__)
|
||||
#define vmsge(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmsge_mu, 4, __riscv_vmsge, 2, 1)(__VA_ARGS__)
|
||||
#define vmsltu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmsltu_mu, 4, __riscv_vmsltu, 2, 1)(__VA_ARGS__)
|
||||
#define vmsleu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmsleu_mu, 4, __riscv_vmsleu, 2, 1)(__VA_ARGS__)
|
||||
#define vmsgtu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmsgtu_mu, 4, __riscv_vmsgtu, 2, 1)(__VA_ARGS__)
|
||||
#define vmsgeu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmsgeu_mu, 4, __riscv_vmsgeu, 2, 1)(__VA_ARGS__)
|
||||
#define vmin(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmin_tumu, 4, __riscv_vmin, 2, 1)(__VA_ARGS__)
|
||||
#define vmax(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmax_tumu, 4, __riscv_vmax, 2, 1)(__VA_ARGS__)
|
||||
#define vminu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vminu_tumu, 4, __riscv_vminu, 2, 1)(__VA_ARGS__)
|
||||
#define vmaxu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmaxu_tumu, 4, __riscv_vmaxu, 2, 1)(__VA_ARGS__)
|
||||
#define vmul(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmul_tumu, 4, __riscv_vmul, 2, 1)(__VA_ARGS__)
|
||||
#define vmulh(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmulh_tumu, 4, __riscv_vmulh, 2, 1)(__VA_ARGS__)
|
||||
#define vmulhsu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmulhsu_tumu, 4, __riscv_vmulhsu, 2, 1)(__VA_ARGS__)
|
||||
#define vmulhu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmulhu_tumu, 4, __riscv_vmulhu, 2, 1)(__VA_ARGS__)
|
||||
#define vdiv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vdiv_tumu, 4, __riscv_vdiv, 2, 1)(__VA_ARGS__)
|
||||
#define vrem(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vrem_tumu, 4, __riscv_vrem, 2, 1)(__VA_ARGS__)
|
||||
#define vdivu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vdivu_tumu, 4, __riscv_vdivu, 2, 1)(__VA_ARGS__)
|
||||
#define vremu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vremu_tumu, 4, __riscv_vremu, 2, 1)(__VA_ARGS__)
|
||||
#define vwmul(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwmul_tumu, 4, __riscv_vwmul, 2, 1)(__VA_ARGS__)
|
||||
#define vwmulsu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwmulsu_tumu, 4, __riscv_vwmulsu, 2, 1)(__VA_ARGS__)
|
||||
#define vwmulu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwmulu_tumu, 4, __riscv_vwmulu, 2, 1)(__VA_ARGS__)
|
||||
#define vmacc(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmacc_tumu, __riscv_vmacc_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vnmsac(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vnmsac_tumu, __riscv_vnmsac_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vmadd(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmadd_tumu, __riscv_vmadd_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vnmsub(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vnmsub_tumu, __riscv_vnmsub_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vwmacc(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwmacc_tumu, __riscv_vwmacc_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vwmaccsu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwmaccsu_tumu, __riscv_vwmaccsu_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vwmaccus(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwmaccus_tumu, __riscv_vwmaccus_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vwmaccu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwmaccu_tumu, __riscv_vwmaccu_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vmv_v(...) __riscv_vmv_v(__VA_ARGS__)
|
||||
#define vsadd(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsadd_tumu, 4, __riscv_vsadd, 2, 1)(__VA_ARGS__)
|
||||
#define vssub(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vssub_tumu, 4, __riscv_vssub, 2, 1)(__VA_ARGS__)
|
||||
#define vsaddu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsaddu_tumu, 4, __riscv_vsaddu, 2, 1)(__VA_ARGS__)
|
||||
#define vssubu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vssubu_tumu, 4, __riscv_vssubu, 2, 1)(__VA_ARGS__)
|
||||
#define vaadd(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vaadd_tumu, 4, __riscv_vaadd, 2, 1)(__VA_ARGS__)
|
||||
#define vasub(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vasub_tumu, 4, __riscv_vasub, 2, 1)(__VA_ARGS__)
|
||||
#define vaaddu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vaaddu_tumu, 4, __riscv_vaaddu, 2, 1)(__VA_ARGS__)
|
||||
#define vasubu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vasubu_tumu, 4, __riscv_vasubu, 2, 1)(__VA_ARGS__)
|
||||
#define vsmul(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vsmul_mu, 4, __riscv_vsmul, 2, 1)(__VA_ARGS__)
|
||||
#define vssra(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vssra_tumu, 4, __riscv_vssra, 2, 1)(__VA_ARGS__)
|
||||
#define vssrl(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vssrl_tumu, 4, __riscv_vssrl, 2, 1)(__VA_ARGS__)
|
||||
#define vnclip(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vnclip_tumu, 4, __riscv_vnclip, 2, 1)(__VA_ARGS__)
|
||||
#define vnclipu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vnclipu_tumu, 4, __riscv_vnclipu, 2, 1)(__VA_ARGS__)
|
||||
#define vfadd(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfadd_tumu, 4, __riscv_vfadd, 2, 1)(__VA_ARGS__)
|
||||
#define vfsub(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfsub_tumu, 4, __riscv_vfsub, 2, 1)(__VA_ARGS__)
|
||||
#define vfrsub(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfrsub_tumu, 4, __riscv_vfrsub, 2, 1)(__VA_ARGS__)
|
||||
#define vfneg(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfneg_tumu, 3, __riscv_vfneg, 1)(__VA_ARGS__)
|
||||
#define vfwadd_vv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwadd_vv_tumu, 4, __riscv_vfwadd_vv, 2, 1)(__VA_ARGS__)
|
||||
#define vfwadd_vf(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwadd_vf_tumu, 4, __riscv_vfwadd_vf, 2, 1)(__VA_ARGS__)
|
||||
#define vfwadd_wv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwadd_wv_tumu, 4, __riscv_vfwadd_wv, 2, 1)(__VA_ARGS__)
|
||||
#define vfwadd_wf(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwadd_wf_tumu, 4, __riscv_vfwadd_wf, 2, 1)(__VA_ARGS__)
|
||||
#define vfwsub_vv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwsub_vv_tumu, 4, __riscv_vfwsub_vv, 2, 1)(__VA_ARGS__)
|
||||
#define vfwsub_vf(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwsub_vf_tumu, 4, __riscv_vfwsub_vf, 2, 1)(__VA_ARGS__)
|
||||
#define vfwsub_wv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwsub_wv_tumu, 4, __riscv_vfwsub_wv, 2, 1)(__VA_ARGS__)
|
||||
#define vfwsub_wf(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwsub_wf_tumu, 4, __riscv_vfwsub_wf, 2, 1)(__VA_ARGS__)
|
||||
#define vfmul(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfmul_tumu, 4, __riscv_vfmul, 2, 1)(__VA_ARGS__)
|
||||
#define vfdiv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfdiv_tumu, 4, __riscv_vfdiv, 2, 1)(__VA_ARGS__)
|
||||
#define vfrdiv(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfrdiv_tumu, 4, __riscv_vfrdiv, 2, 1)(__VA_ARGS__)
|
||||
#define vfwmul(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwmul_tumu, 4, __riscv_vfwmul, 2, 1)(__VA_ARGS__)
|
||||
#define vfmacc(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfmacc_tumu, __riscv_vfmacc_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfnmacc(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfnmacc_tumu, __riscv_vfnmacc_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfmsac(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfmsac_tumu, __riscv_vfmsac_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfnmsac(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfnmsac_tumu, __riscv_vfnmsac_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfmadd(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfmadd_tumu, __riscv_vfmadd_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfnmadd(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfnmadd_tumu, __riscv_vfnmadd_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfmsub(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfmsub_tumu, __riscv_vfmsub_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfnmsub(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfnmsub_tumu, __riscv_vfnmsub_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfwmacc(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwmacc_tumu, __riscv_vfwmacc_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfwnmacc(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwnmacc_tumu, __riscv_vfwnmacc_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfwmsac(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwmsac_tumu, __riscv_vfwmsac_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfwnmsac(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwnmsac_tumu, __riscv_vfwnmsac_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfsqrt(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfsqrt_tumu, 3, __riscv_vfsqrt, 1)(__VA_ARGS__)
|
||||
#define vfrsqrt7(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfrsqrt7_tumu, 3, __riscv_vfrsqrt7, 1)(__VA_ARGS__)
|
||||
#define vfrec7(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfrec7_tumu, 3, __riscv_vfrec7, 1)(__VA_ARGS__)
|
||||
#define vfmin(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfmin_tumu, 4, __riscv_vfmin, 2, 1)(__VA_ARGS__)
|
||||
#define vfmax(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfmax_tumu, 4, __riscv_vfmax, 2, 1)(__VA_ARGS__)
|
||||
#define vfsgnj(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfsgnj_tumu, 4, __riscv_vfsgnj, 2, 1)(__VA_ARGS__)
|
||||
#define vfsgnjn(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfsgnjn_tumu, 4, __riscv_vfsgnjn, 2, 1)(__VA_ARGS__)
|
||||
#define vfsgnjx(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfsgnjx_tumu, 4, __riscv_vfsgnjx, 2, 1)(__VA_ARGS__)
|
||||
#define vfabs(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfabs_tumu, 3, __riscv_vfabs, 1)(__VA_ARGS__)
|
||||
#define vmfeq(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmfeq_mu, 4, __riscv_vmfeq, 2, 1)(__VA_ARGS__)
|
||||
#define vmfne(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmfne_mu, 4, __riscv_vmfne, 2, 1)(__VA_ARGS__)
|
||||
#define vmflt(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmflt_mu, 4, __riscv_vmflt, 2, 1)(__VA_ARGS__)
|
||||
#define vmfle(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmfle_mu, 4, __riscv_vmfle, 2, 1)(__VA_ARGS__)
|
||||
#define vmfgt(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmfgt_mu, 4, __riscv_vmfgt, 2, 1)(__VA_ARGS__)
|
||||
#define vmfge(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vmfge_mu, 4, __riscv_vmfge, 2, 1)(__VA_ARGS__)
|
||||
#define vfclass(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfclass_tumu, 3, __riscv_vfclass, 1)(__VA_ARGS__)
|
||||
#define vfcvt_x(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfcvt_x_tumu, 3, __riscv_vfcvt_x, 1)(__VA_ARGS__)
|
||||
#define vfcvt_rtz_x(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfcvt_rtz_x_tumu, 3, __riscv_vfcvt_rtz_x, 1)(__VA_ARGS__)
|
||||
#define vfcvt_xu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfcvt_xu_tumu, 3, __riscv_vfcvt_xu, 1)(__VA_ARGS__)
|
||||
#define vfcvt_rtz_xu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfcvt_rtz_xu_tumu, 3, __riscv_vfcvt_rtz_xu, 1)(__VA_ARGS__)
|
||||
#define vfcvt_f(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfcvt_f_tumu, 3, __riscv_vfcvt_f, 1)(__VA_ARGS__)
|
||||
#define vwcvt_x(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vwcvt_x_tumu, 3, __riscv_vwcvt_x, 1)(__VA_ARGS__)
|
||||
#define vwcvtu_x(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vwcvtu_x_tumu, 3, __riscv_vwcvtu_x, 1)(__VA_ARGS__)
|
||||
#define vfwcvt_f(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfwcvt_f_tumu, 3, __riscv_vfwcvt_f, 1)(__VA_ARGS__)
|
||||
#define vfwcvt_x(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfwcvt_x_tumu, 3, __riscv_vfwcvt_x, 1)(__VA_ARGS__)
|
||||
#define vfwcvt_rtz_x(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfwcvt_rtz_x_tumu, 3, __riscv_vfwcvt_rtz_x, 1)(__VA_ARGS__)
|
||||
#define vfwcvt_xu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfwcvt_xu_tumu, 3, __riscv_vfwcvt_xu, 1)(__VA_ARGS__)
|
||||
#define vfwcvt_rtz_xu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfwcvt_rtz_xu_tumu, 3, __riscv_vfwcvt_rtz_xu, 1)(__VA_ARGS__)
|
||||
#define vfncvt_x(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfncvt_x_tumu, 3, __riscv_vfncvt_x, 1)(__VA_ARGS__)
|
||||
#define vfncvt_rtz_x(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfncvt_rtz_x_tumu, 3, __riscv_vfncvt_rtz_x, 1)(__VA_ARGS__)
|
||||
#define vncvt_x(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vncvt_x_tumu, 3, __riscv_vncvt_x, 1)(__VA_ARGS__)
|
||||
#define vfncvt_xu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfncvt_xu_tumu, 3, __riscv_vfncvt_xu, 1)(__VA_ARGS__)
|
||||
#define vfncvt_rtz_xu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfncvt_rtz_xu_tumu, 3, __riscv_vfncvt_rtz_xu, 1)(__VA_ARGS__)
|
||||
#define vfncvt_f(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfncvt_f_tumu, 3, __riscv_vfncvt_f, 1)(__VA_ARGS__)
|
||||
#define vfncvt_rod_f(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vfncvt_rod_f_tumu, 3, __riscv_vfncvt_rod_f, 1)(__VA_ARGS__)
|
||||
#define vredsum(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vredsum_tum, __riscv_vredsum_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vredmax(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vredmax_tum, __riscv_vredmax_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vredmin(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vredmin_tum, __riscv_vredmin_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vredand(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vredand_tum, __riscv_vredand_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vredor(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vredor_tum, __riscv_vredor_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vredxor(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vredxor_tum, __riscv_vredxor_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vredmaxu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vredmaxu_tum, __riscv_vredmaxu_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vredminu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vredminu_tum, __riscv_vredminu_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vwredsum(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwredsum_tum, __riscv_vwredsum_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vwredsumu(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vwredsumu_tum, __riscv_vwredsumu_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfredosum(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfredosum_tum, __riscv_vfredosum_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfredusum(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfredusum_tum, __riscv_vfredusum_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfredmax(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfredmax_tum, __riscv_vfredmax_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfredmin(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfredmin_tum, __riscv_vfredmin_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfwredosum(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwredosum_tum, __riscv_vfwredosum_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfwredusum(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfwredusum_tum, __riscv_vfwredusum_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vsm(...) __riscv_vsm(__VA_ARGS__)
|
||||
#define vmand(...) __riscv_vmand(__VA_ARGS__)
|
||||
#define vmnand(...) __riscv_vmnand(__VA_ARGS__)
|
||||
#define vmandn(...) __riscv_vmandn(__VA_ARGS__)
|
||||
#define vmxor(...) __riscv_vmxor(__VA_ARGS__)
|
||||
#define vmor(...) __riscv_vmor(__VA_ARGS__)
|
||||
#define vmnor(...) __riscv_vmnor(__VA_ARGS__)
|
||||
#define vmorn(...) __riscv_vmorn(__VA_ARGS__)
|
||||
#define vmxnor(...) __riscv_vmxnor(__VA_ARGS__)
|
||||
#define vmmv(...) __riscv_vmmv(__VA_ARGS__)
|
||||
#define vmnot(...) __riscv_vmnot(__VA_ARGS__)
|
||||
#define vcpop(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, __riscv_vcpop, __riscv_vcpop, 1)(__VA_ARGS__)
|
||||
#define vfirst(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, __riscv_vfirst, __riscv_vfirst, 1)(__VA_ARGS__)
|
||||
#define vmsbf(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vmsbf_mu, 3, __riscv_vmsbf, 1)(__VA_ARGS__)
|
||||
#define vmsif(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vmsif_mu, 3, __riscv_vmsif, 1)(__VA_ARGS__)
|
||||
#define vmsof(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, __riscv_vmsof_mu, 3, __riscv_vmsof, 1)(__VA_ARGS__)
|
||||
#define vfmv_f(...) __riscv_vfmv_f(__VA_ARGS__)
|
||||
#define vfmv_s(...) __riscv_vfmv_s_tu(__VA_ARGS__)
|
||||
#define vmv_x(...) __riscv_vmv_x(__VA_ARGS__)
|
||||
#define vmv_s(...) __riscv_vmv_s_tu(__VA_ARGS__)
|
||||
#define vslideup(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vslideup_tumu, __riscv_vslideup_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vslidedown(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vslidedown_tumu, __riscv_vslidedown_tu, 3, 2, 1)(__VA_ARGS__)
|
||||
#define vfslide1up(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfslide1up_tumu, 4, __riscv_vfslide1up, 2, 1)(__VA_ARGS__)
|
||||
#define vfslide1down(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vfslide1down_tumu, 4, __riscv_vfslide1down, 2, 1)(__VA_ARGS__)
|
||||
#define vslide1up(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vslide1up_tumu, 4, __riscv_vslide1up, 2, 1)(__VA_ARGS__)
|
||||
#define vslide1down(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vslide1down_tumu, 4, __riscv_vslide1down, 2, 1)(__VA_ARGS__)
|
||||
#define vrgather(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vrgather_tumu, 4, __riscv_vrgather, 2, 1)(__VA_ARGS__)
|
||||
#define vrgatherei16(...) _GET_OVERRIDE(__VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, __riscv_vrgatherei16_tumu, 4, __riscv_vrgatherei16, 2, 1)(__VA_ARGS__)
|
||||
#define vreinterpret_u8mf8(...) __riscv_vreinterpret_u8mf8(__VA_ARGS__)
|
||||
#define vreinterpret_u8mf4(...) __riscv_vreinterpret_u8mf4(__VA_ARGS__)
|
||||
#define vreinterpret_u8mf2(...) __riscv_vreinterpret_u8mf2(__VA_ARGS__)
|
||||
#define vreinterpret_u8m1(...) __riscv_vreinterpret_u8m1(__VA_ARGS__)
|
||||
#define vreinterpret_u8m2(...) __riscv_vreinterpret_u8m2(__VA_ARGS__)
|
||||
#define vreinterpret_u8m4(...) __riscv_vreinterpret_u8m4(__VA_ARGS__)
|
||||
#define vreinterpret_u8m8(...) __riscv_vreinterpret_u8m8(__VA_ARGS__)
|
||||
#define vreinterpret_i8mf8(...) __riscv_vreinterpret_i8mf8(__VA_ARGS__)
|
||||
#define vreinterpret_i8mf4(...) __riscv_vreinterpret_i8mf4(__VA_ARGS__)
|
||||
#define vreinterpret_i8mf2(...) __riscv_vreinterpret_i8mf2(__VA_ARGS__)
|
||||
#define vreinterpret_i8m1(...) __riscv_vreinterpret_i8m1(__VA_ARGS__)
|
||||
#define vreinterpret_i8m2(...) __riscv_vreinterpret_i8m2(__VA_ARGS__)
|
||||
#define vreinterpret_i8m4(...) __riscv_vreinterpret_i8m4(__VA_ARGS__)
|
||||
#define vreinterpret_i8m8(...) __riscv_vreinterpret_i8m8(__VA_ARGS__)
|
||||
#define vreinterpret_f16mf4(...) __riscv_vreinterpret_f16mf4(__VA_ARGS__)
|
||||
#define vreinterpret_f16mf2(...) __riscv_vreinterpret_f16mf2(__VA_ARGS__)
|
||||
#define vreinterpret_f16m1(...) __riscv_vreinterpret_f16m1(__VA_ARGS__)
|
||||
#define vreinterpret_f16m2(...) __riscv_vreinterpret_f16m2(__VA_ARGS__)
|
||||
#define vreinterpret_f16m4(...) __riscv_vreinterpret_f16m4(__VA_ARGS__)
|
||||
#define vreinterpret_f16m8(...) __riscv_vreinterpret_f16m8(__VA_ARGS__)
|
||||
#define vreinterpret_u16mf4(...) __riscv_vreinterpret_u16mf4(__VA_ARGS__)
|
||||
#define vreinterpret_u16mf2(...) __riscv_vreinterpret_u16mf2(__VA_ARGS__)
|
||||
#define vreinterpret_u16m1(...) __riscv_vreinterpret_u16m1(__VA_ARGS__)
|
||||
#define vreinterpret_u16m2(...) __riscv_vreinterpret_u16m2(__VA_ARGS__)
|
||||
#define vreinterpret_u16m4(...) __riscv_vreinterpret_u16m4(__VA_ARGS__)
|
||||
#define vreinterpret_u16m8(...) __riscv_vreinterpret_u16m8(__VA_ARGS__)
|
||||
#define vreinterpret_i16mf4(...) __riscv_vreinterpret_i16mf4(__VA_ARGS__)
|
||||
#define vreinterpret_i16mf2(...) __riscv_vreinterpret_i16mf2(__VA_ARGS__)
|
||||
#define vreinterpret_i16m1(...) __riscv_vreinterpret_i16m1(__VA_ARGS__)
|
||||
#define vreinterpret_i16m2(...) __riscv_vreinterpret_i16m2(__VA_ARGS__)
|
||||
#define vreinterpret_i16m4(...) __riscv_vreinterpret_i16m4(__VA_ARGS__)
|
||||
#define vreinterpret_i16m8(...) __riscv_vreinterpret_i16m8(__VA_ARGS__)
|
||||
#define vreinterpret_f32mf2(...) __riscv_vreinterpret_f32mf2(__VA_ARGS__)
|
||||
#define vreinterpret_f32m1(...) __riscv_vreinterpret_f32m1(__VA_ARGS__)
|
||||
#define vreinterpret_f32m2(...) __riscv_vreinterpret_f32m2(__VA_ARGS__)
|
||||
#define vreinterpret_f32m4(...) __riscv_vreinterpret_f32m4(__VA_ARGS__)
|
||||
#define vreinterpret_f32m8(...) __riscv_vreinterpret_f32m8(__VA_ARGS__)
|
||||
#define vreinterpret_u32mf2(...) __riscv_vreinterpret_u32mf2(__VA_ARGS__)
|
||||
#define vreinterpret_u32m1(...) __riscv_vreinterpret_u32m1(__VA_ARGS__)
|
||||
#define vreinterpret_u32m2(...) __riscv_vreinterpret_u32m2(__VA_ARGS__)
|
||||
#define vreinterpret_u32m4(...) __riscv_vreinterpret_u32m4(__VA_ARGS__)
|
||||
#define vreinterpret_u32m8(...) __riscv_vreinterpret_u32m8(__VA_ARGS__)
|
||||
#define vreinterpret_i32mf2(...) __riscv_vreinterpret_i32mf2(__VA_ARGS__)
|
||||
#define vreinterpret_i32m1(...) __riscv_vreinterpret_i32m1(__VA_ARGS__)
|
||||
#define vreinterpret_i32m2(...) __riscv_vreinterpret_i32m2(__VA_ARGS__)
|
||||
#define vreinterpret_i32m4(...) __riscv_vreinterpret_i32m4(__VA_ARGS__)
|
||||
#define vreinterpret_i32m8(...) __riscv_vreinterpret_i32m8(__VA_ARGS__)
|
||||
#define vreinterpret_f64m1(...) __riscv_vreinterpret_f64m1(__VA_ARGS__)
|
||||
#define vreinterpret_f64m2(...) __riscv_vreinterpret_f64m2(__VA_ARGS__)
|
||||
#define vreinterpret_f64m4(...) __riscv_vreinterpret_f64m4(__VA_ARGS__)
|
||||
#define vreinterpret_f64m8(...) __riscv_vreinterpret_f64m8(__VA_ARGS__)
|
||||
#define vreinterpret_u64m1(...) __riscv_vreinterpret_u64m1(__VA_ARGS__)
|
||||
#define vreinterpret_u64m2(...) __riscv_vreinterpret_u64m2(__VA_ARGS__)
|
||||
#define vreinterpret_u64m4(...) __riscv_vreinterpret_u64m4(__VA_ARGS__)
|
||||
#define vreinterpret_u64m8(...) __riscv_vreinterpret_u64m8(__VA_ARGS__)
|
||||
#define vreinterpret_i64m1(...) __riscv_vreinterpret_i64m1(__VA_ARGS__)
|
||||
#define vreinterpret_i64m2(...) __riscv_vreinterpret_i64m2(__VA_ARGS__)
|
||||
#define vreinterpret_i64m4(...) __riscv_vreinterpret_i64m4(__VA_ARGS__)
|
||||
#define vreinterpret_i64m8(...) __riscv_vreinterpret_i64m8(__VA_ARGS__)
|
||||
#define vlmul_ext_f16mf2(...) __riscv_vlmul_ext_f16mf2(__VA_ARGS__)
|
||||
#define vlmul_ext_f16m1(...) __riscv_vlmul_ext_f16m1(__VA_ARGS__)
|
||||
#define vlmul_ext_f16m2(...) __riscv_vlmul_ext_f16m2(__VA_ARGS__)
|
||||
#define vlmul_ext_f16m4(...) __riscv_vlmul_ext_f16m4(__VA_ARGS__)
|
||||
#define vlmul_ext_f16m8(...) __riscv_vlmul_ext_f16m8(__VA_ARGS__)
|
||||
#define vlmul_ext_f32m1(...) __riscv_vlmul_ext_f32m1(__VA_ARGS__)
|
||||
#define vlmul_ext_f32m2(...) __riscv_vlmul_ext_f32m2(__VA_ARGS__)
|
||||
#define vlmul_ext_f32m4(...) __riscv_vlmul_ext_f32m4(__VA_ARGS__)
|
||||
#define vlmul_ext_f32m8(...) __riscv_vlmul_ext_f32m8(__VA_ARGS__)
|
||||
#define vlmul_ext_f64m2(...) __riscv_vlmul_ext_f64m2(__VA_ARGS__)
|
||||
#define vlmul_ext_f64m4(...) __riscv_vlmul_ext_f64m4(__VA_ARGS__)
|
||||
#define vlmul_ext_f64m8(...) __riscv_vlmul_ext_f64m8(__VA_ARGS__)
|
||||
#define vlmul_ext_i8mf4(...) __riscv_vlmul_ext_i8mf4(__VA_ARGS__)
|
||||
#define vlmul_ext_i8mf2(...) __riscv_vlmul_ext_i8mf2(__VA_ARGS__)
|
||||
#define vlmul_ext_i8m1(...) __riscv_vlmul_ext_i8m1(__VA_ARGS__)
|
||||
#define vlmul_ext_i8m2(...) __riscv_vlmul_ext_i8m2(__VA_ARGS__)
|
||||
#define vlmul_ext_i8m4(...) __riscv_vlmul_ext_i8m4(__VA_ARGS__)
|
||||
#define vlmul_ext_i8m8(...) __riscv_vlmul_ext_i8m8(__VA_ARGS__)
|
||||
#define vlmul_ext_i16mf2(...) __riscv_vlmul_ext_i16mf2(__VA_ARGS__)
|
||||
#define vlmul_ext_i16m1(...) __riscv_vlmul_ext_i16m1(__VA_ARGS__)
|
||||
#define vlmul_ext_i16m2(...) __riscv_vlmul_ext_i16m2(__VA_ARGS__)
|
||||
#define vlmul_ext_i16m4(...) __riscv_vlmul_ext_i16m4(__VA_ARGS__)
|
||||
#define vlmul_ext_i16m8(...) __riscv_vlmul_ext_i16m8(__VA_ARGS__)
|
||||
#define vlmul_ext_i32m1(...) __riscv_vlmul_ext_i32m1(__VA_ARGS__)
|
||||
#define vlmul_ext_i32m2(...) __riscv_vlmul_ext_i32m2(__VA_ARGS__)
|
||||
#define vlmul_ext_i32m4(...) __riscv_vlmul_ext_i32m4(__VA_ARGS__)
|
||||
#define vlmul_ext_i32m8(...) __riscv_vlmul_ext_i32m8(__VA_ARGS__)
|
||||
#define vlmul_ext_i64m2(...) __riscv_vlmul_ext_i64m2(__VA_ARGS__)
|
||||
#define vlmul_ext_i64m4(...) __riscv_vlmul_ext_i64m4(__VA_ARGS__)
|
||||
#define vlmul_ext_i64m8(...) __riscv_vlmul_ext_i64m8(__VA_ARGS__)
|
||||
#define vlmul_ext_u8mf4(...) __riscv_vlmul_ext_u8mf4(__VA_ARGS__)
|
||||
#define vlmul_ext_u8mf2(...) __riscv_vlmul_ext_u8mf2(__VA_ARGS__)
|
||||
#define vlmul_ext_u8m1(...) __riscv_vlmul_ext_u8m1(__VA_ARGS__)
|
||||
#define vlmul_ext_u8m2(...) __riscv_vlmul_ext_u8m2(__VA_ARGS__)
|
||||
#define vlmul_ext_u8m4(...) __riscv_vlmul_ext_u8m4(__VA_ARGS__)
|
||||
#define vlmul_ext_u8m8(...) __riscv_vlmul_ext_u8m8(__VA_ARGS__)
|
||||
#define vlmul_ext_u16mf2(...) __riscv_vlmul_ext_u16mf2(__VA_ARGS__)
|
||||
#define vlmul_ext_u16m1(...) __riscv_vlmul_ext_u16m1(__VA_ARGS__)
|
||||
#define vlmul_ext_u16m2(...) __riscv_vlmul_ext_u16m2(__VA_ARGS__)
|
||||
#define vlmul_ext_u16m4(...) __riscv_vlmul_ext_u16m4(__VA_ARGS__)
|
||||
#define vlmul_ext_u16m8(...) __riscv_vlmul_ext_u16m8(__VA_ARGS__)
|
||||
#define vlmul_ext_u32m1(...) __riscv_vlmul_ext_u32m1(__VA_ARGS__)
|
||||
#define vlmul_ext_u32m2(...) __riscv_vlmul_ext_u32m2(__VA_ARGS__)
|
||||
#define vlmul_ext_u32m4(...) __riscv_vlmul_ext_u32m4(__VA_ARGS__)
|
||||
#define vlmul_ext_u32m8(...) __riscv_vlmul_ext_u32m8(__VA_ARGS__)
|
||||
#define vlmul_ext_u64m2(...) __riscv_vlmul_ext_u64m2(__VA_ARGS__)
|
||||
#define vlmul_ext_u64m4(...) __riscv_vlmul_ext_u64m4(__VA_ARGS__)
|
||||
#define vlmul_ext_u64m8(...) __riscv_vlmul_ext_u64m8(__VA_ARGS__)
|
||||
#define vlmul_trunc_f16mf4(...) __riscv_vlmul_trunc_f16mf4(__VA_ARGS__)
|
||||
#define vlmul_trunc_f16mf2(...) __riscv_vlmul_trunc_f16mf2(__VA_ARGS__)
|
||||
#define vlmul_trunc_f16m1(...) __riscv_vlmul_trunc_f16m1(__VA_ARGS__)
|
||||
#define vlmul_trunc_f16m2(...) __riscv_vlmul_trunc_f16m2(__VA_ARGS__)
|
||||
#define vlmul_trunc_f16m4(...) __riscv_vlmul_trunc_f16m4(__VA_ARGS__)
|
||||
#define vlmul_trunc_f32mf2(...) __riscv_vlmul_trunc_f32mf2(__VA_ARGS__)
|
||||
#define vlmul_trunc_f32m1(...) __riscv_vlmul_trunc_f32m1(__VA_ARGS__)
|
||||
#define vlmul_trunc_f32m2(...) __riscv_vlmul_trunc_f32m2(__VA_ARGS__)
|
||||
#define vlmul_trunc_f32m4(...) __riscv_vlmul_trunc_f32m4(__VA_ARGS__)
|
||||
#define vlmul_trunc_f64m1(...) __riscv_vlmul_trunc_f64m1(__VA_ARGS__)
|
||||
#define vlmul_trunc_f64m2(...) __riscv_vlmul_trunc_f64m2(__VA_ARGS__)
|
||||
#define vlmul_trunc_f64m4(...) __riscv_vlmul_trunc_f64m4(__VA_ARGS__)
|
||||
#define vlmul_trunc_i8mf8(...) __riscv_vlmul_trunc_i8mf8(__VA_ARGS__)
|
||||
#define vlmul_trunc_i8mf4(...) __riscv_vlmul_trunc_i8mf4(__VA_ARGS__)
|
||||
#define vlmul_trunc_i8mf2(...) __riscv_vlmul_trunc_i8mf2(__VA_ARGS__)
|
||||
#define vlmul_trunc_i8m1(...) __riscv_vlmul_trunc_i8m1(__VA_ARGS__)
|
||||
#define vlmul_trunc_i8m2(...) __riscv_vlmul_trunc_i8m2(__VA_ARGS__)
|
||||
#define vlmul_trunc_i8m4(...) __riscv_vlmul_trunc_i8m4(__VA_ARGS__)
|
||||
#define vlmul_trunc_i16mf4(...) __riscv_vlmul_trunc_i16mf4(__VA_ARGS__)
|
||||
#define vlmul_trunc_i16mf2(...) __riscv_vlmul_trunc_i16mf2(__VA_ARGS__)
|
||||
#define vlmul_trunc_i16m1(...) __riscv_vlmul_trunc_i16m1(__VA_ARGS__)
|
||||
#define vlmul_trunc_i16m2(...) __riscv_vlmul_trunc_i16m2(__VA_ARGS__)
|
||||
#define vlmul_trunc_i16m4(...) __riscv_vlmul_trunc_i16m4(__VA_ARGS__)
|
||||
#define vlmul_trunc_i32mf2(...) __riscv_vlmul_trunc_i32mf2(__VA_ARGS__)
|
||||
#define vlmul_trunc_i32m1(...) __riscv_vlmul_trunc_i32m1(__VA_ARGS__)
|
||||
#define vlmul_trunc_i32m2(...) __riscv_vlmul_trunc_i32m2(__VA_ARGS__)
|
||||
#define vlmul_trunc_i32m4(...) __riscv_vlmul_trunc_i32m4(__VA_ARGS__)
|
||||
#define vlmul_trunc_i64m1(...) __riscv_vlmul_trunc_i64m1(__VA_ARGS__)
|
||||
#define vlmul_trunc_i64m2(...) __riscv_vlmul_trunc_i64m2(__VA_ARGS__)
|
||||
#define vlmul_trunc_i64m4(...) __riscv_vlmul_trunc_i64m4(__VA_ARGS__)
|
||||
#define vlmul_trunc_u8mf8(...) __riscv_vlmul_trunc_u8mf8(__VA_ARGS__)
|
||||
#define vlmul_trunc_u8mf4(...) __riscv_vlmul_trunc_u8mf4(__VA_ARGS__)
|
||||
#define vlmul_trunc_u8mf2(...) __riscv_vlmul_trunc_u8mf2(__VA_ARGS__)
|
||||
#define vlmul_trunc_u8m1(...) __riscv_vlmul_trunc_u8m1(__VA_ARGS__)
|
||||
#define vlmul_trunc_u8m2(...) __riscv_vlmul_trunc_u8m2(__VA_ARGS__)
|
||||
#define vlmul_trunc_u8m4(...) __riscv_vlmul_trunc_u8m4(__VA_ARGS__)
|
||||
#define vlmul_trunc_u16mf4(...) __riscv_vlmul_trunc_u16mf4(__VA_ARGS__)
|
||||
#define vlmul_trunc_u16mf2(...) __riscv_vlmul_trunc_u16mf2(__VA_ARGS__)
|
||||
#define vlmul_trunc_u16m1(...) __riscv_vlmul_trunc_u16m1(__VA_ARGS__)
|
||||
#define vlmul_trunc_u16m2(...) __riscv_vlmul_trunc_u16m2(__VA_ARGS__)
|
||||
#define vlmul_trunc_u16m4(...) __riscv_vlmul_trunc_u16m4(__VA_ARGS__)
|
||||
#define vlmul_trunc_u32mf2(...) __riscv_vlmul_trunc_u32mf2(__VA_ARGS__)
|
||||
#define vlmul_trunc_u32m1(...) __riscv_vlmul_trunc_u32m1(__VA_ARGS__)
|
||||
#define vlmul_trunc_u32m2(...) __riscv_vlmul_trunc_u32m2(__VA_ARGS__)
|
||||
#define vlmul_trunc_u32m4(...) __riscv_vlmul_trunc_u32m4(__VA_ARGS__)
|
||||
#define vlmul_trunc_u64m1(...) __riscv_vlmul_trunc_u64m1(__VA_ARGS__)
|
||||
#define vlmul_trunc_u64m2(...) __riscv_vlmul_trunc_u64m2(__VA_ARGS__)
|
||||
#define vlmul_trunc_u64m4(...) __riscv_vlmul_trunc_u64m4(__VA_ARGS__)
|
||||
#define vset(...) __riscv_vset(__VA_ARGS__)
|
||||
#define vget_f16m1(...) __riscv_vget_f16m1(__VA_ARGS__)
|
||||
#define vget_f16m2(...) __riscv_vget_f16m2(__VA_ARGS__)
|
||||
#define vget_f16m4(...) __riscv_vget_f16m4(__VA_ARGS__)
|
||||
#define vget_f32m1(...) __riscv_vget_f32m1(__VA_ARGS__)
|
||||
#define vget_f32m2(...) __riscv_vget_f32m2(__VA_ARGS__)
|
||||
#define vget_f32m4(...) __riscv_vget_f32m4(__VA_ARGS__)
|
||||
#define vget_f64m1(...) __riscv_vget_f64m1(__VA_ARGS__)
|
||||
#define vget_f64m2(...) __riscv_vget_f64m2(__VA_ARGS__)
|
||||
#define vget_f64m4(...) __riscv_vget_f64m4(__VA_ARGS__)
|
||||
#define vget_i8m1(...) __riscv_vget_i8m1(__VA_ARGS__)
|
||||
#define vget_i8m2(...) __riscv_vget_i8m2(__VA_ARGS__)
|
||||
#define vget_i8m4(...) __riscv_vget_i8m4(__VA_ARGS__)
|
||||
#define vget_i16m1(...) __riscv_vget_i16m1(__VA_ARGS__)
|
||||
#define vget_i16m2(...) __riscv_vget_i16m2(__VA_ARGS__)
|
||||
#define vget_i16m4(...) __riscv_vget_i16m4(__VA_ARGS__)
|
||||
#define vget_i32m1(...) __riscv_vget_i32m1(__VA_ARGS__)
|
||||
#define vget_i32m2(...) __riscv_vget_i32m2(__VA_ARGS__)
|
||||
#define vget_i32m4(...) __riscv_vget_i32m4(__VA_ARGS__)
|
||||
#define vget_i64m1(...) __riscv_vget_i64m1(__VA_ARGS__)
|
||||
#define vget_i64m2(...) __riscv_vget_i64m2(__VA_ARGS__)
|
||||
#define vget_i64m4(...) __riscv_vget_i64m4(__VA_ARGS__)
|
||||
#define vget_u8m1(...) __riscv_vget_u8m1(__VA_ARGS__)
|
||||
#define vget_u8m2(...) __riscv_vget_u8m2(__VA_ARGS__)
|
||||
#define vget_u8m4(...) __riscv_vget_u8m4(__VA_ARGS__)
|
||||
#define vget_u16m1(...) __riscv_vget_u16m1(__VA_ARGS__)
|
||||
#define vget_u16m2(...) __riscv_vget_u16m2(__VA_ARGS__)
|
||||
#define vget_u16m4(...) __riscv_vget_u16m4(__VA_ARGS__)
|
||||
#define vget_u32m1(...) __riscv_vget_u32m1(__VA_ARGS__)
|
||||
#define vget_u32m2(...) __riscv_vget_u32m2(__VA_ARGS__)
|
||||
#define vget_u32m4(...) __riscv_vget_u32m4(__VA_ARGS__)
|
||||
#define vget_u64m1(...) __riscv_vget_u64m1(__VA_ARGS__)
|
||||
#define vget_u64m2(...) __riscv_vget_u64m2(__VA_ARGS__)
|
||||
#define vget_u64m4(...) __riscv_vget_u64m4(__VA_ARGS__)
|
||||
#define vle16(...) __riscv_vle16_tumu(__VA_ARGS__)
|
||||
#define vle32(...) __riscv_vle32_tumu(__VA_ARGS__)
|
||||
#define vle64(...) __riscv_vle64_tumu(__VA_ARGS__)
|
||||
#define vle8(...) __riscv_vle8_tumu(__VA_ARGS__)
|
||||
#define vlse16(...) __riscv_vlse16_tumu(__VA_ARGS__)
|
||||
#define vlse32(...) __riscv_vlse32_tumu(__VA_ARGS__)
|
||||
#define vlse64(...) __riscv_vlse64_tumu(__VA_ARGS__)
|
||||
#define vlse8(...) __riscv_vlse8_tumu(__VA_ARGS__)
|
||||
#define vle16ff(...) __riscv_vle16ff_tumu(__VA_ARGS__)
|
||||
#define vle32ff(...) __riscv_vle32ff_tumu(__VA_ARGS__)
|
||||
#define vle64ff(...) __riscv_vle64ff_tumu(__VA_ARGS__)
|
||||
#define vle8ff(...) __riscv_vle8ff_tumu(__VA_ARGS__)
|
||||
#define vlseg2e16(...) __riscv_vlseg2e16_tumu(__VA_ARGS__)
|
||||
#define vlseg3e16(...) __riscv_vlseg3e16_tumu(__VA_ARGS__)
|
||||
#define vlseg4e16(...) __riscv_vlseg4e16_tumu(__VA_ARGS__)
|
||||
#define vlseg5e16(...) __riscv_vlseg5e16_tumu(__VA_ARGS__)
|
||||
#define vlseg6e16(...) __riscv_vlseg6e16_tumu(__VA_ARGS__)
|
||||
#define vlseg7e16(...) __riscv_vlseg7e16_tumu(__VA_ARGS__)
|
||||
#define vlseg8e16(...) __riscv_vlseg8e16_tumu(__VA_ARGS__)
|
||||
#define vlseg2e32(...) __riscv_vlseg2e32_tumu(__VA_ARGS__)
|
||||
#define vlseg3e32(...) __riscv_vlseg3e32_tumu(__VA_ARGS__)
|
||||
#define vlseg4e32(...) __riscv_vlseg4e32_tumu(__VA_ARGS__)
|
||||
#define vlseg5e32(...) __riscv_vlseg5e32_tumu(__VA_ARGS__)
|
||||
#define vlseg6e32(...) __riscv_vlseg6e32_tumu(__VA_ARGS__)
|
||||
#define vlseg7e32(...) __riscv_vlseg7e32_tumu(__VA_ARGS__)
|
||||
#define vlseg8e32(...) __riscv_vlseg8e32_tumu(__VA_ARGS__)
|
||||
#define vlseg2e64(...) __riscv_vlseg2e64_tumu(__VA_ARGS__)
|
||||
#define vlseg3e64(...) __riscv_vlseg3e64_tumu(__VA_ARGS__)
|
||||
#define vlseg4e64(...) __riscv_vlseg4e64_tumu(__VA_ARGS__)
|
||||
#define vlseg5e64(...) __riscv_vlseg5e64_tumu(__VA_ARGS__)
|
||||
#define vlseg6e64(...) __riscv_vlseg6e64_tumu(__VA_ARGS__)
|
||||
#define vlseg7e64(...) __riscv_vlseg7e64_tumu(__VA_ARGS__)
|
||||
#define vlseg8e64(...) __riscv_vlseg8e64_tumu(__VA_ARGS__)
|
||||
#define vlseg2e16ff(...) __riscv_vlseg2e16ff_tumu(__VA_ARGS__)
|
||||
#define vlseg3e16ff(...) __riscv_vlseg3e16ff_tumu(__VA_ARGS__)
|
||||
#define vlseg4e16ff(...) __riscv_vlseg4e16ff_tumu(__VA_ARGS__)
|
||||
#define vlseg5e16ff(...) __riscv_vlseg5e16ff_tumu(__VA_ARGS__)
|
||||
#define vlseg6e16ff(...) __riscv_vlseg6e16ff_tumu(__VA_ARGS__)
|
||||
#define vlseg7e16ff(...) __riscv_vlseg7e16ff_tumu(__VA_ARGS__)
|
||||
#define vlseg8e16ff(...) __riscv_vlseg8e16ff_tumu(__VA_ARGS__)
|
||||
#define vlseg2e32ff(...) __riscv_vlseg2e32ff_tumu(__VA_ARGS__)
|
||||
#define vlseg3e32ff(...) __riscv_vlseg3e32ff_tumu(__VA_ARGS__)
|
||||
#define vlseg4e32ff(...) __riscv_vlseg4e32ff_tumu(__VA_ARGS__)
|
||||
#define vlseg5e32ff(...) __riscv_vlseg5e32ff_tumu(__VA_ARGS__)
|
||||
#define vlseg6e32ff(...) __riscv_vlseg6e32ff_tumu(__VA_ARGS__)
|
||||
#define vlseg7e32ff(...) __riscv_vlseg7e32ff_tumu(__VA_ARGS__)
|
||||
#define vlseg8e32ff(...) __riscv_vlseg8e32ff_tumu(__VA_ARGS__)
|
||||
#define vlseg2e64ff(...) __riscv_vlseg2e64ff_tumu(__VA_ARGS__)
|
||||
#define vlseg3e64ff(...) __riscv_vlseg3e64ff_tumu(__VA_ARGS__)
|
||||
#define vlseg4e64ff(...) __riscv_vlseg4e64ff_tumu(__VA_ARGS__)
|
||||
#define vlseg5e64ff(...) __riscv_vlseg5e64ff_tumu(__VA_ARGS__)
|
||||
#define vlseg6e64ff(...) __riscv_vlseg6e64ff_tumu(__VA_ARGS__)
|
||||
#define vlseg7e64ff(...) __riscv_vlseg7e64ff_tumu(__VA_ARGS__)
|
||||
#define vlseg8e64ff(...) __riscv_vlseg8e64ff_tumu(__VA_ARGS__)
|
||||
#define vlseg2e8(...) __riscv_vlseg2e8_tumu(__VA_ARGS__)
|
||||
#define vlseg3e8(...) __riscv_vlseg3e8_tumu(__VA_ARGS__)
|
||||
#define vlseg4e8(...) __riscv_vlseg4e8_tumu(__VA_ARGS__)
|
||||
#define vlseg5e8(...) __riscv_vlseg5e8_tumu(__VA_ARGS__)
|
||||
#define vlseg6e8(...) __riscv_vlseg6e8_tumu(__VA_ARGS__)
|
||||
#define vlseg7e8(...) __riscv_vlseg7e8_tumu(__VA_ARGS__)
|
||||
#define vlseg8e8(...) __riscv_vlseg8e8_tumu(__VA_ARGS__)
|
||||
#define vlseg2e8ff(...) __riscv_vlseg2e8ff_tumu(__VA_ARGS__)
|
||||
#define vlseg3e8ff(...) __riscv_vlseg3e8ff_tumu(__VA_ARGS__)
|
||||
#define vlseg4e8ff(...) __riscv_vlseg4e8ff_tumu(__VA_ARGS__)
|
||||
#define vlseg5e8ff(...) __riscv_vlseg5e8ff_tumu(__VA_ARGS__)
|
||||
#define vlseg6e8ff(...) __riscv_vlseg6e8ff_tumu(__VA_ARGS__)
|
||||
#define vlseg7e8ff(...) __riscv_vlseg7e8ff_tumu(__VA_ARGS__)
|
||||
#define vlseg8e8ff(...) __riscv_vlseg8e8ff_tumu(__VA_ARGS__)
|
||||
#define vlsseg2e16(...) __riscv_vlsseg2e16_tumu(__VA_ARGS__)
|
||||
#define vlsseg3e16(...) __riscv_vlsseg3e16_tumu(__VA_ARGS__)
|
||||
#define vlsseg4e16(...) __riscv_vlsseg4e16_tumu(__VA_ARGS__)
|
||||
#define vlsseg5e16(...) __riscv_vlsseg5e16_tumu(__VA_ARGS__)
|
||||
#define vlsseg6e16(...) __riscv_vlsseg6e16_tumu(__VA_ARGS__)
|
||||
#define vlsseg7e16(...) __riscv_vlsseg7e16_tumu(__VA_ARGS__)
|
||||
#define vlsseg8e16(...) __riscv_vlsseg8e16_tumu(__VA_ARGS__)
|
||||
#define vlsseg2e32(...) __riscv_vlsseg2e32_tumu(__VA_ARGS__)
|
||||
#define vlsseg3e32(...) __riscv_vlsseg3e32_tumu(__VA_ARGS__)
|
||||
#define vlsseg4e32(...) __riscv_vlsseg4e32_tumu(__VA_ARGS__)
|
||||
#define vlsseg5e32(...) __riscv_vlsseg5e32_tumu(__VA_ARGS__)
|
||||
#define vlsseg6e32(...) __riscv_vlsseg6e32_tumu(__VA_ARGS__)
|
||||
#define vlsseg7e32(...) __riscv_vlsseg7e32_tumu(__VA_ARGS__)
|
||||
#define vlsseg8e32(...) __riscv_vlsseg8e32_tumu(__VA_ARGS__)
|
||||
#define vlsseg2e64(...) __riscv_vlsseg2e64_tumu(__VA_ARGS__)
|
||||
#define vlsseg3e64(...) __riscv_vlsseg3e64_tumu(__VA_ARGS__)
|
||||
#define vlsseg4e64(...) __riscv_vlsseg4e64_tumu(__VA_ARGS__)
|
||||
#define vlsseg5e64(...) __riscv_vlsseg5e64_tumu(__VA_ARGS__)
|
||||
#define vlsseg6e64(...) __riscv_vlsseg6e64_tumu(__VA_ARGS__)
|
||||
#define vlsseg7e64(...) __riscv_vlsseg7e64_tumu(__VA_ARGS__)
|
||||
#define vlsseg8e64(...) __riscv_vlsseg8e64_tumu(__VA_ARGS__)
|
||||
#define vlsseg2e8(...) __riscv_vlsseg2e8_tumu(__VA_ARGS__)
|
||||
#define vlsseg3e8(...) __riscv_vlsseg3e8_tumu(__VA_ARGS__)
|
||||
#define vlsseg4e8(...) __riscv_vlsseg4e8_tumu(__VA_ARGS__)
|
||||
#define vlsseg5e8(...) __riscv_vlsseg5e8_tumu(__VA_ARGS__)
|
||||
#define vlsseg6e8(...) __riscv_vlsseg6e8_tumu(__VA_ARGS__)
|
||||
#define vlsseg7e8(...) __riscv_vlsseg7e8_tumu(__VA_ARGS__)
|
||||
#define vlsseg8e8(...) __riscv_vlsseg8e8_tumu(__VA_ARGS__)
|
||||
#define viota(...) __riscv_viota_tumu(__VA_ARGS__)
|
||||
#define vid(...) __riscv_vid_tumu(__VA_ARGS__)
|
||||
#endif
|
||||
@@ -0,0 +1,207 @@
|
||||
// This file is part of OpenCV project.
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
|
||||
#ifndef OPENCV_HAL_INTRIN_RVV_COMPAT_OVERLOAD_HPP
|
||||
#define OPENCV_HAL_INTRIN_RVV_COMPAT_OVERLOAD_HPP
|
||||
|
||||
// This file requires VTraits to be defined for vector types
|
||||
|
||||
#define OPENCV_HAL_IMPL_RVV_FUN_AND(REG, SUF) \
|
||||
inline static REG vand(const REG & op1, const REG & op2, size_t vl) \
|
||||
{ \
|
||||
return vand_vv_##SUF(op1, op2, vl); \
|
||||
}
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_FUN_AND(vint8m1_t, i8m1)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_AND(vuint8m1_t, u8m1)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_AND(vint16m1_t, i16m1)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_AND(vuint16m1_t, u16m1)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_AND(vint32m1_t, i32m1)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_AND(vuint32m1_t, u32m1)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_AND(vint64m1_t, i64m1)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_AND(vuint64m1_t, u64m1)
|
||||
|
||||
#define OPENCV_HAL_IMPL_RVV_FUN_LOXEI(REG, SUF, INDX, ISUF) \
|
||||
inline static REG vloxe##ISUF(const VTraits<REG>::lane_type *base, INDX bindex, size_t vl) \
|
||||
{ \
|
||||
return vloxe##ISUF##_v_##SUF(base, bindex, vl); \
|
||||
}
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vint8m1_t, i8m1, vuint8m1_t, i8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vint8m2_t, i8m2, vuint8m2_t, i8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vint8m4_t, i8m4, vuint8m4_t, i8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vint8m8_t, i8m8, vuint8m8_t, i8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vint8m1_t, i8m1, vuint32m4_t, i32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vint8m2_t, i8m2, vuint32m8_t, i32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vint16m1_t, i16m1, vuint32m2_t, i32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vint32m1_t, i32m1, vuint32m1_t, i32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vint32m2_t, i32m2, vuint32m2_t, i32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vint32m4_t, i32m4, vuint32m4_t, i32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vint32m8_t, i32m8, vuint32m8_t, i32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vint64m1_t, i64m1, vuint32mf2_t, i32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vuint8m1_t, u8m1, vuint8m1_t, i8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vuint8m2_t, u8m2, vuint8m2_t, i8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vuint8m4_t, u8m4, vuint8m4_t, i8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vuint8m8_t, u8m8, vuint8m8_t, i8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vfloat32m1_t, f32m1, vuint32m1_t, i32)
|
||||
#if CV_SIMD_SCALABLE_64F
|
||||
OPENCV_HAL_IMPL_RVV_FUN_LOXEI(vfloat64m1_t, f64m1, vuint32mf2_t, i32)
|
||||
#endif
|
||||
|
||||
#define OPENCV_HAL_IMPL_RVV_FUN_MUL(REG, SUF) \
|
||||
inline static REG##m1_t vmul(const REG##m1_t & op1, const REG##m1_t & op2, size_t vl) \
|
||||
{ \
|
||||
return vmul_vv_##SUF##m1(op1, op2, vl); \
|
||||
} \
|
||||
inline static REG##m1_t vmul(const REG##m1_t & op1, VTraits<REG##m1_t>::lane_type op2, size_t vl) \
|
||||
{ \
|
||||
return vmul_vx_##SUF##m1(op1, op2, vl); \
|
||||
} \
|
||||
inline static REG##m2_t vmul(const REG##m2_t & op1, const REG##m2_t & op2, size_t vl) \
|
||||
{ \
|
||||
return vmul_vv_##SUF##m2(op1, op2, vl); \
|
||||
} \
|
||||
inline static REG##m2_t vmul(const REG##m2_t & op1, VTraits<REG##m2_t>::lane_type op2, size_t vl) \
|
||||
{ \
|
||||
return vmul_vx_##SUF##m2(op1, op2, vl); \
|
||||
} \
|
||||
inline static REG##m4_t vmul(const REG##m4_t & op1, const REG##m4_t & op2, size_t vl) \
|
||||
{ \
|
||||
return vmul_vv_##SUF##m4(op1, op2, vl); \
|
||||
} \
|
||||
inline static REG##m4_t vmul(const REG##m4_t & op1, VTraits<REG##m4_t>::lane_type op2, size_t vl) \
|
||||
{ \
|
||||
return vmul_vx_##SUF##m4(op1, op2, vl); \
|
||||
} \
|
||||
inline static REG##m8_t vmul(const REG##m8_t & op1, const REG##m8_t & op2, size_t vl) \
|
||||
{ \
|
||||
return vmul_vv_##SUF##m8(op1, op2, vl); \
|
||||
} \
|
||||
inline static REG##m8_t vmul(const REG##m8_t & op1, VTraits<REG##m8_t>::lane_type op2, size_t vl) \
|
||||
{ \
|
||||
return vmul_vx_##SUF##m8(op1, op2, vl); \
|
||||
}
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_FUN_MUL(vint8, i8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_MUL(vuint8, u8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_MUL(vint16, i16)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_MUL(vuint16, u16)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_MUL(vint32, i32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_MUL(vuint32, u32)
|
||||
|
||||
#define OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(REG1, SUF1, REG2, SUF2) \
|
||||
inline static REG1##m1_t vreinterpret_##SUF1##m1(const REG2##m1_t & src) \
|
||||
{\
|
||||
return vreinterpret_v_##SUF2##m1_##SUF1##m1(src); \
|
||||
} \
|
||||
inline static REG1##m2_t vreinterpret_##SUF1##m2(const REG2##m2_t & src) \
|
||||
{\
|
||||
return vreinterpret_v_##SUF2##m2_##SUF1##m2(src); \
|
||||
} \
|
||||
inline static REG1##m4_t vreinterpret_##SUF1##m4(const REG2##m4_t & src) \
|
||||
{\
|
||||
return vreinterpret_v_##SUF2##m4_##SUF1##m4(src); \
|
||||
} \
|
||||
inline static REG1##m8_t vreinterpret_##SUF1##m8(const REG2##m8_t & src) \
|
||||
{\
|
||||
return vreinterpret_v_##SUF2##m8_##SUF1##m8(src); \
|
||||
}
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vint8, i8, vuint8, u8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vint16, i16, vuint16, u16)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vint32, i32, vuint32, u32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vfloat32, f32, vuint32, u32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vfloat32, f32, vint32, i32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vuint32, u32, vfloat32, f32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vint32, i32, vfloat32, f32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vuint8, u8, vint8, i8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vuint8, u8, vuint16, u16)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vuint8, u8, vuint32, u32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vuint8, u8, vuint64, u64)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vuint16, u16, vint16, i16)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vuint16, u16, vuint8, u8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vuint16, u16, vuint32, u32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vuint16, u16, vuint64, u64)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vuint32, u32, vint32, i32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vuint32, u32, vuint8, u8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vuint32, u32, vuint16, u16)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_REINTERPRET(vuint32, u32, vuint64, u64)
|
||||
|
||||
#define OPENCV_HAL_IMPL_RVV_FUN_STORE(REG, SUF, SZ) \
|
||||
inline static void vse##SZ(VTraits<REG>::lane_type *base, REG value, size_t vl) \
|
||||
{ \
|
||||
return vse##SZ##_v_##SUF##m1(base, value, vl); \
|
||||
}
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_FUN_STORE(v_uint8, u8, 8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_STORE(v_int8, i8, 8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_STORE(v_uint16, u16, 16)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_STORE(v_int16, i16, 16)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_STORE(v_uint32, u32, 32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_STORE(v_int32, i32, 32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_STORE(v_uint64, u64, 64)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_STORE(v_int64, i64, 64)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_STORE(v_float32, f32, 32)
|
||||
#if CV_SIMD_SCALABLE_64F
|
||||
OPENCV_HAL_IMPL_RVV_FUN_STORE(v_float64, f64, 64)
|
||||
#endif
|
||||
|
||||
#define OPENCV_HAL_IMPL_RVV_FUN_EXTRACT(REG, SUF) \
|
||||
inline static VTraits<REG>::lane_type vmv_x(const REG & reg) \
|
||||
{\
|
||||
return vmv_x_s_##SUF##m1_##SUF(reg); \
|
||||
}
|
||||
#define OPENCV_HAL_IMPL_RVV_FUN_EXTRACT_F(REG, SUF) \
|
||||
inline static VTraits<REG>::lane_type vfmv_f(const REG & reg) \
|
||||
{\
|
||||
return vfmv_f_s_##SUF##m1_##SUF(reg); \
|
||||
}
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_FUN_EXTRACT(v_uint8, u8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_EXTRACT(v_int8, i8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_EXTRACT(v_uint16, u16)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_EXTRACT(v_int16, i16)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_EXTRACT(v_uint32, u32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_EXTRACT(v_int32, i32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_EXTRACT(v_uint64, u64)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_EXTRACT(v_int64, i64)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_EXTRACT_F(v_float32, f32)
|
||||
#if CV_SIMD_SCALABLE_64F
|
||||
OPENCV_HAL_IMPL_RVV_FUN_EXTRACT_F(v_float64, f64)
|
||||
#endif
|
||||
|
||||
#define OPENCV_HAL_IMPL_RVV_FUN_SLIDE(REG, SUF) \
|
||||
inline static REG vslidedown(const REG & dst, const REG & src, size_t offset, size_t vl) \
|
||||
{ \
|
||||
return vslidedown_vx_##SUF##m1(dst, src, offset, vl); \
|
||||
} \
|
||||
inline static REG vslideup(const REG & dst, const REG & src, size_t offset, size_t vl) \
|
||||
{ \
|
||||
return vslideup_vx_##SUF##m1(dst, src, offset, vl); \
|
||||
}
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_FUN_SLIDE(v_uint8, u8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_SLIDE(v_int8, i8)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_SLIDE(v_uint16, u16)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_SLIDE(v_int16, i16)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_SLIDE(v_uint32, u32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_SLIDE(v_int32, i32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_SLIDE(v_float32, f32)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_SLIDE(v_uint64, u64)
|
||||
OPENCV_HAL_IMPL_RVV_FUN_SLIDE(v_int64, i64)
|
||||
#if CV_SIMD_SCALABLE_64F
|
||||
OPENCV_HAL_IMPL_RVV_FUN_SLIDE(v_float64, f64)
|
||||
#endif
|
||||
|
||||
inline static vuint32mf2_t vmul(const vuint32mf2_t & op1, uint32_t op2, size_t vl)
|
||||
{
|
||||
return vmul_vx_u32mf2(op1, op2, vl);
|
||||
}
|
||||
|
||||
inline static vuint32mf2_t vreinterpret_u32mf2(vint32mf2_t val)
|
||||
{
|
||||
return vreinterpret_v_i32mf2_u32mf2(val);
|
||||
}
|
||||
|
||||
#endif //OPENCV_HAL_INTRIN_RVV_COMPAT_OVERLOAD_HPP
|
||||
@@ -13,6 +13,14 @@
|
||||
#include <vector>
|
||||
#include <opencv2/core/check.hpp>
|
||||
|
||||
// RVV intrinsics have been renamed in version 0.11, so we need to include
|
||||
// compatibility headers:
|
||||
// https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/master/auto-generated/rvv-v0p10-compatible-headers
|
||||
#if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic>10999
|
||||
#include "intrin_rvv_010_compat_non-policy.hpp"
|
||||
#include "intrin_rvv_010_compat_overloaded-non-policy.hpp"
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
// FIXIT: eliminate massive warnigs from templates
|
||||
// GCC from 'rvv-next': riscv64-unknown-linux-gnu-g++ (g42df3464463) 12.0.1 20220505 (prerelease)
|
||||
@@ -52,89 +60,93 @@ using uint = unsigned int;
|
||||
using uint64 = unsigned long int;
|
||||
using int64 = long int;
|
||||
|
||||
static const int __cv_rvv_e8_nlanes = vsetvlmax_e8m1();
|
||||
static const int __cv_rvv_e16_nlanes = vsetvlmax_e16m1();
|
||||
static const int __cv_rvv_e32_nlanes = vsetvlmax_e32m1();
|
||||
static const int __cv_rvv_e64_nlanes = vsetvlmax_e64m1();
|
||||
static const int __cv_rvv_e8m1_nlanes = vsetvlmax_e8m1();
|
||||
static const int __cv_rvv_e16m1_nlanes = vsetvlmax_e16m1();
|
||||
static const int __cv_rvv_e32m1_nlanes = vsetvlmax_e32m1();
|
||||
static const int __cv_rvv_e64m1_nlanes = vsetvlmax_e64m1();
|
||||
static const int __cv_rvv_e8m2_nlanes = vsetvlmax_e8m2();
|
||||
static const int __cv_rvv_e16m2_nlanes = vsetvlmax_e16m2();
|
||||
static const int __cv_rvv_e32m2_nlanes = vsetvlmax_e32m2();
|
||||
static const int __cv_rvv_e64m2_nlanes = vsetvlmax_e64m2();
|
||||
static const int __cv_rvv_e8m4_nlanes = vsetvlmax_e8m4();
|
||||
static const int __cv_rvv_e16m4_nlanes = vsetvlmax_e16m4();
|
||||
static const int __cv_rvv_e32m4_nlanes = vsetvlmax_e32m4();
|
||||
static const int __cv_rvv_e64m4_nlanes = vsetvlmax_e64m4();
|
||||
static const int __cv_rvv_e8m8_nlanes = vsetvlmax_e8m8();
|
||||
static const int __cv_rvv_e16m8_nlanes = vsetvlmax_e16m8();
|
||||
static const int __cv_rvv_e32m8_nlanes = vsetvlmax_e32m8();
|
||||
static const int __cv_rvv_e64m8_nlanes = vsetvlmax_e64m8();
|
||||
|
||||
template <class T>
|
||||
struct VTraits;
|
||||
|
||||
template <>
|
||||
struct VTraits<v_uint8>
|
||||
{
|
||||
static inline int vlanes() { return __cv_rvv_e8_nlanes; }
|
||||
using lane_type = uchar;
|
||||
static const int max_nlanes = CV_RVV_MAX_VLEN/8;
|
||||
#define OPENCV_HAL_IMPL_RVV_TRAITS(REG, TYP, SUF, SZ) \
|
||||
template <> \
|
||||
struct VTraits<REG> \
|
||||
{ \
|
||||
static inline int vlanes() { return __cv_rvv_##SUF##_nlanes; } \
|
||||
using lane_type = TYP; \
|
||||
static const int max_nlanes = CV_RVV_MAX_VLEN/SZ; \
|
||||
};
|
||||
|
||||
template <>
|
||||
struct VTraits<v_int8>
|
||||
{
|
||||
static inline int vlanes() { return __cv_rvv_e8_nlanes; }
|
||||
using lane_type = schar;
|
||||
static const int max_nlanes = CV_RVV_MAX_VLEN/8;
|
||||
};
|
||||
template <>
|
||||
struct VTraits<v_uint16>
|
||||
{
|
||||
static inline int vlanes() { return __cv_rvv_e16_nlanes; }
|
||||
using lane_type = ushort;
|
||||
static const int max_nlanes = CV_RVV_MAX_VLEN/16;
|
||||
};
|
||||
template <>
|
||||
struct VTraits<v_int16>
|
||||
{
|
||||
static inline int vlanes() { return __cv_rvv_e16_nlanes; }
|
||||
using lane_type = short;
|
||||
static const int max_nlanes = CV_RVV_MAX_VLEN/16;
|
||||
};
|
||||
template <>
|
||||
struct VTraits<v_uint32>
|
||||
{
|
||||
static inline int vlanes() { return __cv_rvv_e32_nlanes; }
|
||||
using lane_type = uint;
|
||||
static const int max_nlanes = CV_RVV_MAX_VLEN/32;
|
||||
};
|
||||
template <>
|
||||
struct VTraits<v_int32>
|
||||
{
|
||||
static inline int vlanes() { return __cv_rvv_e32_nlanes; }
|
||||
using lane_type = int;
|
||||
static const int max_nlanes = CV_RVV_MAX_VLEN/32;
|
||||
};
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint8m1_t, int8_t, e8m1, 8)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint8m2_t, int8_t, e8m2, 8)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint8m4_t, int8_t, e8m4, 8)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint8m8_t, int8_t, e8m8, 8)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint8m1_t, uint8_t, e8m1, 8)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint8m2_t, uint8_t, e8m2, 8)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint8m4_t, uint8_t, e8m4, 8)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint8m8_t, uint8_t, e8m8, 8)
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint16m1_t, int16_t, e16m1, 16)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint16m2_t, int16_t, e16m2, 16)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint16m4_t, int16_t, e16m4, 16)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint16m8_t, int16_t, e16m8, 16)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint16m1_t, uint16_t, e16m1, 16)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint16m2_t, uint16_t, e16m2, 16)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint16m4_t, uint16_t, e16m4, 16)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint16m8_t, uint16_t, e16m8, 16)
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint32m1_t, int32_t, e32m1, 32)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint32m2_t, int32_t, e32m2, 32)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint32m4_t, int32_t, e32m4, 32)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint32m8_t, int32_t, e32m8, 32)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint32m1_t, uint32_t, e32m1, 32)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint32m2_t, uint32_t, e32m2, 32)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint32m4_t, uint32_t, e32m4, 32)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint32m8_t, uint32_t, e32m8, 32)
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint64m1_t, int64_t, e64m1, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint64m2_t, int64_t, e64m2, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint64m4_t, int64_t, e64m4, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vint64m8_t, int64_t, e64m8, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint64m1_t, uint64_t, e64m1, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint64m2_t, uint64_t, e64m2, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint64m4_t, uint64_t, e64m4, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vuint64m8_t, uint64_t, e64m8, 64)
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vfloat32m1_t, float, e32m1, 32)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vfloat32m2_t, float, e32m2, 32)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vfloat32m4_t, float, e32m4, 32)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vfloat32m8_t, float, e32m8, 32)
|
||||
|
||||
template <>
|
||||
struct VTraits<v_float32>
|
||||
{
|
||||
static inline int vlanes() { return __cv_rvv_e32_nlanes; }
|
||||
using lane_type = float;
|
||||
static const int max_nlanes = CV_RVV_MAX_VLEN/32;
|
||||
};
|
||||
template <>
|
||||
struct VTraits<v_uint64>
|
||||
{
|
||||
static inline int vlanes() { return __cv_rvv_e64_nlanes; }
|
||||
using lane_type = uint64;
|
||||
static const int max_nlanes = CV_RVV_MAX_VLEN/64;
|
||||
};
|
||||
template <>
|
||||
struct VTraits<v_int64>
|
||||
{
|
||||
static inline int vlanes() { return __cv_rvv_e64_nlanes; }
|
||||
using lane_type = int64;
|
||||
static const int max_nlanes = CV_RVV_MAX_VLEN/64;
|
||||
};
|
||||
#if CV_SIMD_SCALABLE_64F
|
||||
template <>
|
||||
struct VTraits<v_float64>
|
||||
{
|
||||
static inline int vlanes() { return __cv_rvv_e64_nlanes; }
|
||||
using lane_type = double;
|
||||
static const int max_nlanes = CV_RVV_MAX_VLEN/64;
|
||||
};
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vfloat64m1_t, double, e64m1, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vfloat64m2_t, double, e64m2, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vfloat64m4_t, double, e64m4, 64)
|
||||
OPENCV_HAL_IMPL_RVV_TRAITS(vfloat64m8_t, double, e64m8, 64)
|
||||
#endif
|
||||
|
||||
|
||||
// LLVM/Clang defines "overloaded intrinsics" e.g. 'vand(op1, op2)'
|
||||
// GCC does not have these functions, so we need to implement them manually
|
||||
// We implement only selected subset required to build current state of the code
|
||||
// Included inside namespace cv::
|
||||
#ifndef __riscv_v_intrinsic_overloading
|
||||
#include "intrin_rvv_compat_overloaded.hpp"
|
||||
#endif // __riscv_v_intrinsic_overloading
|
||||
|
||||
|
||||
//////////// get0 ////////////
|
||||
#define OPENCV_HAL_IMPL_RVV_GRT0_INT(_Tpvec, _Tp) \
|
||||
inline _Tp v_get0(const v_##_Tpvec& v) \
|
||||
@@ -435,7 +447,7 @@ inline _Tpvec v_lut(const _Tp* tab, const int* idx) \
|
||||
inline _Tpvec v_lut_pairs(const _Tp* tab, const int* idx) \
|
||||
{ \
|
||||
std::vector<uint> idx_; \
|
||||
for (size_t i = 0; i < VTraits<v_int16>::vlanes(); ++i) { \
|
||||
for (int i = 0; i < VTraits<v_int16>::vlanes(); ++i) { \
|
||||
idx_.push_back(idx[i]); \
|
||||
idx_.push_back(idx[i]+1); \
|
||||
} \
|
||||
@@ -445,7 +457,7 @@ inline _Tpvec v_lut_pairs(const _Tp* tab, const int* idx) \
|
||||
inline _Tpvec v_lut_quads(const _Tp* tab, const int* idx) \
|
||||
{ \
|
||||
std::vector<uint> idx_; \
|
||||
for (size_t i = 0; i < VTraits<v_int32>::vlanes(); ++i) { \
|
||||
for (int i = 0; i < VTraits<v_int32>::vlanes(); ++i) { \
|
||||
idx_.push_back(idx[i]); \
|
||||
idx_.push_back(idx[i]+1); \
|
||||
idx_.push_back(idx[i]+2); \
|
||||
@@ -479,7 +491,7 @@ inline v_uint64 v_lut_quads(const uint64* tab, const int* idx) { return v_reinte
|
||||
////////////// Pack boolean ////////////////////
|
||||
inline v_uint8 v_pack_b(const v_uint16& a, const v_uint16& b)
|
||||
{
|
||||
return vnsrl(vset(vlmul_ext_u16m2(a),1,b), 0, VTraits<v_uint8>::vlanes());
|
||||
return vnsrl(vset(vlmul_ext_v_u16m1_u16m2(a),1,b), 0, VTraits<v_uint8>::vlanes());
|
||||
}
|
||||
|
||||
inline v_uint8 v_pack_b(const v_uint32& a, const v_uint32& b,
|
||||
@@ -1074,11 +1086,11 @@ inline v_float64 v_muladd(const v_float64& a, const v_float64& b, const v_float6
|
||||
#define OPENCV_HAL_IMPL_RVV_CHECK_ALLANY(_Tpvec, vl) \
|
||||
inline bool v_check_all(const _Tpvec& a) \
|
||||
{ \
|
||||
return vcpop(vmslt(a, 0, vl), vl) == vl; \
|
||||
return (int)vcpop(vmslt(a, 0, vl), vl) == vl; \
|
||||
} \
|
||||
inline bool v_check_any(const _Tpvec& a) \
|
||||
{ \
|
||||
return vcpop(vmslt(a, 0, vl), vl) != 0; \
|
||||
return (int)vcpop(vmslt(a, 0, vl), vl) != 0; \
|
||||
}
|
||||
|
||||
OPENCV_HAL_IMPL_RVV_CHECK_ALLANY(v_int8, VTraits<v_int8>::vlanes())
|
||||
|
||||
@@ -1921,11 +1921,12 @@ OPENCV_HAL_IMPL_SSE_EXPAND(v_int16x8, v_int32x4, short, _v128_cvtepi16_epi
|
||||
OPENCV_HAL_IMPL_SSE_EXPAND(v_uint32x4, v_uint64x2, unsigned, _v128_cvtepu32_epi64)
|
||||
OPENCV_HAL_IMPL_SSE_EXPAND(v_int32x4, v_int64x2, int, _v128_cvtepi32_epi64)
|
||||
|
||||
#define OPENCV_HAL_IMPL_SSE_EXPAND_Q(_Tpvec, _Tp, intrin) \
|
||||
inline _Tpvec v_load_expand_q(const _Tp* ptr) \
|
||||
{ \
|
||||
__m128i a = _mm_cvtsi32_si128(*(const int*)ptr); \
|
||||
return _Tpvec(intrin(a)); \
|
||||
#define OPENCV_HAL_IMPL_SSE_EXPAND_Q(_Tpvec, _Tp, intrin) \
|
||||
inline _Tpvec v_load_expand_q(const _Tp* ptr) \
|
||||
{ \
|
||||
typedef int CV_DECL_ALIGNED(1) unaligned_int; \
|
||||
__m128i a = _mm_cvtsi32_si128(*(const unaligned_int*)ptr); \
|
||||
return _Tpvec(intrin(a)); \
|
||||
}
|
||||
|
||||
OPENCV_HAL_IMPL_SSE_EXPAND_Q(v_uint32x4, uchar, _v128_cvtepu8_epi32)
|
||||
|
||||
@@ -692,7 +692,8 @@ protected:
|
||||
Impl* p;
|
||||
};
|
||||
|
||||
CV_EXPORTS const char* convertTypeStr(int sdepth, int ddepth, int cn, char* buf);
|
||||
CV_EXPORTS CV_DEPRECATED const char* convertTypeStr(int sdepth, int ddepth, int cn, char* buf);
|
||||
CV_EXPORTS const char* convertTypeStr(int sdepth, int ddepth, int cn, char* buf, size_t buf_size);
|
||||
CV_EXPORTS const char* typeToStr(int t);
|
||||
CV_EXPORTS const char* memopTypeToStr(int t);
|
||||
CV_EXPORTS const char* vecopTypeToStr(int t);
|
||||
|
||||
@@ -61,10 +61,10 @@
|
||||
# define CV_FORMAT_PRINTF(A, B)
|
||||
#endif
|
||||
|
||||
//! @cond IGNORED
|
||||
|
||||
namespace cv
|
||||
{
|
||||
//! @cond IGNORED
|
||||
|
||||
|
||||
////////////////////////////// Matx methods depending on core API /////////////////////////////
|
||||
|
||||
@@ -434,26 +434,6 @@ template<typename _Tp> static inline _Tp randu()
|
||||
return (_Tp)theRNG();
|
||||
}
|
||||
|
||||
///////////////////////////////// Formatted string generation /////////////////////////////////
|
||||
|
||||
/** @brief Returns a text string formatted using the printf-like expression.
|
||||
|
||||
The function acts like sprintf but forms and returns an STL string. It can be used to form an error
|
||||
message in the Exception constructor.
|
||||
@param fmt printf-compatible formatting specifiers.
|
||||
|
||||
**Note**:
|
||||
|Type|Specifier|
|
||||
|-|-|
|
||||
|`const char*`|`%s`|
|
||||
|`char`|`%c`|
|
||||
|`float` / `double`|`%f`,`%g`|
|
||||
|`int`, `long`, `long long`|`%d`, `%ld`, ``%lld`|
|
||||
|`unsigned`, `unsigned long`, `unsigned long long`|`%u`, `%lu`, `%llu`|
|
||||
|`uint64` -> `uintmax_t`, `int64` -> `intmax_t`|`%ju`, `%jd`|
|
||||
|`size_t`|`%zu`|
|
||||
*/
|
||||
CV_EXPORTS String format( const char* fmt, ... ) CV_FORMAT_PRINTF(1, 2);
|
||||
|
||||
///////////////////////////////// Formatted output of cv::Mat /////////////////////////////////
|
||||
|
||||
@@ -506,6 +486,28 @@ int print(const Matx<_Tp, m, n>& matx, FILE* stream = stdout)
|
||||
|
||||
//! @endcond
|
||||
|
||||
///////////////////////////////// Formatted string generation /////////////////////////////////
|
||||
|
||||
/** @brief Returns a text string formatted using the printf-like expression.
|
||||
|
||||
The function acts like sprintf but forms and returns an STL string. It can be used to form an error
|
||||
message in the Exception constructor.
|
||||
@param fmt printf-compatible formatting specifiers.
|
||||
|
||||
**Note**:
|
||||
|Type|Specifier|
|
||||
|-|-|
|
||||
|`const char*`|`%s`|
|
||||
|`char`|`%c`|
|
||||
|`float` / `double`|`%f`,`%g`|
|
||||
|`int`, `long`, `long long`|`%d`, `%ld`, ``%lld`|
|
||||
|`unsigned`, `unsigned long`, `unsigned long long`|`%u`, `%lu`, `%llu`|
|
||||
|`uint64` -> `uintmax_t`, `int64` -> `intmax_t`|`%ju`, `%jd`|
|
||||
|`size_t`|`%zu`|
|
||||
@ingroup core_utils
|
||||
*/
|
||||
CV_EXPORTS String format(const char* fmt, ...) CV_FORMAT_PRINTF(1, 2);
|
||||
|
||||
/****************************************************************************************\
|
||||
* Auxiliary algorithms *
|
||||
\****************************************************************************************/
|
||||
|
||||
@@ -235,6 +235,10 @@ T* allocSingletonNew() { return new(allocSingletonNewBuffer(sizeof(T))) T(); }
|
||||
#include "ipp.h"
|
||||
#endif
|
||||
#ifdef HAVE_IPP_IW
|
||||
# if defined(__OPENCV_BUILD) && defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wstrict-prototypes"
|
||||
# endif
|
||||
# if defined(__OPENCV_BUILD) && defined(__GNUC__) && __GNUC__ >= 5
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wsuggest-override"
|
||||
@@ -246,6 +250,9 @@ T* allocSingletonNew() { return new(allocSingletonNewBuffer(sizeof(T))) T(); }
|
||||
# if defined(__OPENCV_BUILD) && defined(__GNUC__) && __GNUC__ >= 5
|
||||
# pragma GCC diagnostic pop
|
||||
# endif
|
||||
# if defined(__OPENCV_BUILD) && defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if IPP_VERSION_X100 >= 201700
|
||||
|
||||
@@ -77,9 +77,9 @@ public:
|
||||
* For intrinsic rotations in the order of X-Y-Z, the rotation matrix R can be calculated by:\f[R =X(\theta_1) Y(\theta_2) Z(\theta_3) \f]
|
||||
* For extrinsic rotations in the order of X-Y-Z, the rotation matrix R can be calculated by:\f[R =Z({\theta_3}) Y({\theta_2}) X({\theta_1})\f]
|
||||
* where
|
||||
* \f[X({\theta})={\begin{bmatrix}1&0&0\\0&\cos {\theta_1} &-\sin {\theta_1} \\0&\sin {\theta_1} &\cos {\theta_1} \\\end{bmatrix}},
|
||||
* Y({\theta})={\begin{bmatrix}\cos \theta_{2}&0&\sin \theta_{2}\\0&1 &0 \\\ -sin \theta_2& 0&\cos \theta_{2} \\\end{bmatrix}},
|
||||
* Z({\theta})={\begin{bmatrix}\cos\theta_{3} &-\sin \theta_3&0\\\sin \theta_3 &\cos \theta_3 &0\\0&0&1\\\end{bmatrix}}.
|
||||
* \f[X({\theta_1})={\begin{bmatrix}1&0&0\\0&\cos {\theta_1} &-\sin {\theta_1} \\0&\sin {\theta_1} &\cos {\theta_1} \\\end{bmatrix}},
|
||||
* Y({\theta_2})={\begin{bmatrix}\cos \theta_{2}&0&\sin \theta_{2}\\0&1 &0 \\\ -sin \theta_2& 0&\cos \theta_{2} \\\end{bmatrix}},
|
||||
* Z({\theta_3})={\begin{bmatrix}\cos\theta_{3} &-\sin \theta_3&0\\\sin \theta_3 &\cos \theta_3 &0\\0&0&1\\\end{bmatrix}}.
|
||||
* \f]
|
||||
*
|
||||
* The function is designed according to this set of conventions:
|
||||
|
||||
@@ -745,8 +745,8 @@ Quat<T> Quat<T>::lerp(const Quat<T> &q0, const Quat<T> &q1, const T t)
|
||||
template <typename T>
|
||||
Quat<T> Quat<T>::slerp(const Quat<T> &q0, const Quat<T> &q1, const T t, QuatAssumeType assumeUnit, bool directChange)
|
||||
{
|
||||
Quatd v0(q0);
|
||||
Quatd v1(q1);
|
||||
Quat<T> v0(q0);
|
||||
Quat<T> v1(q1);
|
||||
if (!assumeUnit)
|
||||
{
|
||||
v0 = v0.normalize();
|
||||
@@ -754,7 +754,7 @@ Quat<T> Quat<T>::slerp(const Quat<T> &q0, const Quat<T> &q1, const T t, QuatAssu
|
||||
}
|
||||
T cosTheta = v0.dot(v1);
|
||||
constexpr T DOT_THRESHOLD = 0.995;
|
||||
if (cosTheta > DOT_THRESHOLD)
|
||||
if (std::abs(cosTheta) > DOT_THRESHOLD)
|
||||
{
|
||||
return nlerp(v0, v1, t, QUAT_ASSUME_UNIT);
|
||||
}
|
||||
@@ -843,7 +843,7 @@ Quat<T> Quat<T>::interPoint(const Quat<T> &q0, const Quat<T> &q1,
|
||||
template <typename T>
|
||||
Quat<T> Quat<T>::spline(const Quat<T> &q0, const Quat<T> &q1, const Quat<T> &q2, const Quat<T> &q3, const T t, QuatAssumeType assumeUnit)
|
||||
{
|
||||
Quatd v0(q0), v1(q1), v2(q2), v3(q3);
|
||||
Quat<T> v0(q0), v1(q1), v2(q2), v3(q3);
|
||||
if (!assumeUnit)
|
||||
{
|
||||
v0 = v0.normalize();
|
||||
|
||||
@@ -545,8 +545,11 @@ public:
|
||||
*/
|
||||
RotatedRect(const Point2f& point1, const Point2f& point2, const Point2f& point3);
|
||||
|
||||
/** returns 4 vertices of the rectangle
|
||||
@param pts The points array for storing rectangle vertices. The order is bottomLeft, topLeft, topRight, bottomRight.
|
||||
/** returns 4 vertices of the rotated rectangle
|
||||
@param pts The points array for storing rectangle vertices. The order is _bottomLeft_, _topLeft_, topRight, bottomRight.
|
||||
@note _Bottom_, _Top_, _Left_ and _Right_ sides refer to the original rectangle (angle is 0),
|
||||
so after 180 degree rotation _bottomLeft_ point will be located at the top right corner of the
|
||||
rectangle.
|
||||
*/
|
||||
void points(Point2f pts[]) const;
|
||||
//! returns the minimal up-right integer rectangle containing the rotated rectangle
|
||||
|
||||
@@ -179,11 +179,11 @@ CV_EXPORTS ErrorCallback redirectError( ErrorCallback errCallback, void* userdat
|
||||
CV_EXPORTS String tempfile( const char* suffix = 0);
|
||||
CV_EXPORTS void glob(String pattern, std::vector<String>& result, bool recursive = false);
|
||||
|
||||
/** @brief OpenCV will try to set the number of threads for the next parallel region.
|
||||
/** @brief OpenCV will try to set the number of threads for subsequent parallel regions.
|
||||
|
||||
If threads == 0, OpenCV will disable threading optimizations and run all it's functions
|
||||
sequentially. Passing threads \< 0 will reset threads number to system default. This function must
|
||||
be called outside of parallel region.
|
||||
If threads == 1, OpenCV will disable threading optimizations and run all it's functions
|
||||
sequentially. Passing threads \< 0 will reset threads number to system default.
|
||||
The function is not thread-safe. It must not be called in parallel region or concurrent threads.
|
||||
|
||||
OpenCV will try to run its functions with specified threads number, but some behaviour differs from
|
||||
framework:
|
||||
|
||||
@@ -122,10 +122,7 @@
|
||||
"}",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
"checkHardwareSupport" : {"j_code" : [""], "jn_code" : [""], "cpp_code" : [""] },
|
||||
"setUseOptimized" : {"j_code" : [""], "jn_code" : [""], "cpp_code" : [""] },
|
||||
"useOptimized" : {"j_code" : [""], "jn_code" : [""], "cpp_code" : [""] }
|
||||
}
|
||||
}
|
||||
},
|
||||
"func_arg_fix" : {
|
||||
|
||||
@@ -2059,4 +2059,12 @@ public class CoreTest extends OpenCVTestCase {
|
||||
assertEquals(Core.VERSION, Core.getVersionString());
|
||||
}
|
||||
|
||||
public void testHardwareOptions() {
|
||||
Core.checkHardwareSupport(0);
|
||||
boolean original_status = Core.useOptimized();
|
||||
Core.setUseOptimized(!original_status);
|
||||
assertEquals(!original_status, Core.useOptimized());
|
||||
Core.setUseOptimized(original_status);
|
||||
assertEquals(original_status, Core.useOptimized());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,14 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifdef AVAILABLE_IMGCODECS
|
||||
#if TARGET_OS_IPHONE
|
||||
#import <UIKit/UIKit.h>
|
||||
#elif TARGET_OS_MAC
|
||||
#import <AppKit/AppKit.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@class Size2i;
|
||||
@class Scalar;
|
||||
@class Range;
|
||||
@@ -181,6 +189,37 @@ CV_EXPORTS @interface Mat : NSObject
|
||||
- (int)put:(NSArray<NSNumber*>*)indices count:(int)count intBuffer:(const int*)buffer NS_REFINED_FOR_SWIFT;
|
||||
- (int)put:(NSArray<NSNumber*>*)indices count:(int)count shortBuffer:(const short*)buffer NS_REFINED_FOR_SWIFT;
|
||||
|
||||
#pragma mark - Converters
|
||||
|
||||
#ifdef AVAILABLE_IMGCODECS
|
||||
|
||||
- (CGImageRef)toCGImage CF_RETURNS_RETAINED;
|
||||
- (instancetype)initWithCGImage:(CGImageRef)image;
|
||||
- (instancetype)initWithCGImage:(CGImageRef)image alphaExist:(BOOL)alphaExist;
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
||||
- (UIImage*)toUIImage;
|
||||
- (instancetype)initWithUIImage:(UIImage*)image;
|
||||
- (instancetype)initWithUIImage:(UIImage*)image alphaExist:(BOOL)alphaExist;
|
||||
|
||||
#elif TARGET_OS_MAC
|
||||
|
||||
- (NSImage*)toNSImage;
|
||||
- (instancetype)initWithNSImage:(NSImage*)image;
|
||||
- (instancetype)initWithNSImage:(NSImage*)image alphaExist:(BOOL)alphaExist;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#pragma mark - QuickLook
|
||||
|
||||
#ifdef AVAILABLE_IMGCODECS
|
||||
|
||||
- (id)debugQuickLookObject;
|
||||
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -13,6 +13,11 @@
|
||||
#import "CvType.h"
|
||||
#import "CVObjcUtil.h"
|
||||
|
||||
#ifdef AVAILABLE_IMGCODECS
|
||||
#import "MatConverters.h"
|
||||
#import "MatQuickLook.h"
|
||||
#endif
|
||||
|
||||
static int idx2Offset(cv::Mat* mat, std::vector<int>& indices) {
|
||||
int offset = indices[0];
|
||||
for (int dim=1; dim < mat->dims; dim++) {
|
||||
@@ -932,4 +937,54 @@ template<typename T> int putData(NSArray<NSNumber*>* indices, cv::Mat* mat, int
|
||||
return [self cols];
|
||||
}
|
||||
|
||||
#ifdef AVAILABLE_IMGCODECS
|
||||
|
||||
-(CGImageRef)toCGImage {
|
||||
return [MatConverters convertMatToCGImageRef:self];
|
||||
}
|
||||
|
||||
-(instancetype)initWithCGImage:(CGImageRef)image {
|
||||
return [MatConverters convertCGImageRefToMat:image];
|
||||
}
|
||||
|
||||
-(instancetype)initWithCGImage:(CGImageRef)image alphaExist:(BOOL)alphaExist {
|
||||
return [MatConverters convertCGImageRefToMat:image alphaExist:alphaExist];
|
||||
}
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
||||
-(UIImage*)toUIImage {
|
||||
return [MatConverters converMatToUIImage:self];
|
||||
}
|
||||
|
||||
-(instancetype)initWithUIImage:(UIImage*)image {
|
||||
return [MatConverters convertUIImageToMat:image];
|
||||
}
|
||||
|
||||
-(instancetype)initWithUIImage:(UIImage*)image alphaExist:(BOOL)alphaExist {
|
||||
return [MatConverters convertUIImageToMat:image alphaExist:alphaExist];
|
||||
}
|
||||
|
||||
#elif TARGET_OS_MAC
|
||||
|
||||
-(NSImage*)toNSImage {
|
||||
return [MatConverters converMatToNSImage:self];
|
||||
}
|
||||
|
||||
-(instancetype)initWithNSImage:(NSImage*)image {
|
||||
return [MatConverters convertNSImageToMat:image];
|
||||
}
|
||||
|
||||
-(instancetype)initWithNSImage:(NSImage*)image alphaExist:(BOOL)alphaExist {
|
||||
return [MatConverters convertNSImageToMat:image alphaExist:alphaExist];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
- (id)debugQuickLookObject {
|
||||
return [MatQuickLook matDebugQuickLookObject:self];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef OPENCV_CORE_PYOPENCV_CORE_HPP
|
||||
#define OPENCV_CORE_PYOPENCV_CORE_HPP
|
||||
|
||||
#ifdef HAVE_OPENCV_CORE
|
||||
|
||||
static PyObject* pycvMakeType(PyObject* , PyObject* args, PyObject* kw) {
|
||||
const char *keywords[] = { "depth", "channels", NULL };
|
||||
|
||||
int depth, channels;
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kw, "ii", (char**)keywords, &depth, &channels))
|
||||
return NULL;
|
||||
|
||||
int type = CV_MAKETYPE(depth, channels);
|
||||
return PyInt_FromLong(type);
|
||||
}
|
||||
|
||||
template <int depth>
|
||||
static PyObject* pycvMakeTypeCh(PyObject*, PyObject *value) {
|
||||
int channels = (int)PyLong_AsLong(value);
|
||||
return PyInt_FromLong(CV_MAKETYPE(depth, channels));
|
||||
}
|
||||
|
||||
#define PYOPENCV_EXTRA_METHODS_CV \
|
||||
{"CV_MAKETYPE", CV_PY_FN_WITH_KW(pycvMakeType), "CV_MAKETYPE(depth, channels) -> retval"}, \
|
||||
{"CV_8UC", (PyCFunction)(pycvMakeTypeCh<CV_8U>), METH_O, "CV_8UC(channels) -> retval"}, \
|
||||
{"CV_8SC", (PyCFunction)(pycvMakeTypeCh<CV_8S>), METH_O, "CV_8SC(channels) -> retval"}, \
|
||||
{"CV_16UC", (PyCFunction)(pycvMakeTypeCh<CV_16U>), METH_O, "CV_16UC(channels) -> retval"}, \
|
||||
{"CV_16SC", (PyCFunction)(pycvMakeTypeCh<CV_16S>), METH_O, "CV_16SC(channels) -> retval"}, \
|
||||
{"CV_32SC", (PyCFunction)(pycvMakeTypeCh<CV_32S>), METH_O, "CV_32SC(channels) -> retval"}, \
|
||||
{"CV_32FC", (PyCFunction)(pycvMakeTypeCh<CV_32F>), METH_O, "CV_32FC(channels) -> retval"}, \
|
||||
{"CV_64FC", (PyCFunction)(pycvMakeTypeCh<CV_64F>), METH_O, "CV_64FC(channels) -> retval"}, \
|
||||
{"CV_16FC", (PyCFunction)(pycvMakeTypeCh<CV_16F>), METH_O, "CV_16FC(channels) -> retval"},
|
||||
|
||||
#endif // HAVE_OPENCV_CORE
|
||||
#endif // OPENCV_CORE_PYOPENCV_CORE_HPP
|
||||
@@ -1150,7 +1150,7 @@ OCL_PERF_TEST_P(ReduceMinMaxFixture, Reduce,
|
||||
SANITY_CHECK(dst, eps);
|
||||
}
|
||||
|
||||
CV_ENUM(ReduceAccOp, CV_REDUCE_SUM, CV_REDUCE_AVG)
|
||||
CV_ENUM(ReduceAccOp, REDUCE_SUM, REDUCE_AVG, REDUCE_SUM2)
|
||||
|
||||
typedef tuple<Size, std::pair<MatType, MatType>, int, ReduceAccOp> ReduceAccParams;
|
||||
typedef TestBaseWithParam<ReduceAccParams> ReduceAccFixture;
|
||||
@@ -1168,7 +1168,6 @@ OCL_PERF_TEST_P(ReduceAccFixture, Reduce,
|
||||
dim = get<2>(params), op = get<3>(params);
|
||||
const Size srcSize = get<0>(params),
|
||||
dstSize(dim == 0 ? srcSize.width : 1, dim == 0 ? 1 : srcSize.height);
|
||||
const double eps = CV_MAT_DEPTH(dtype) <= CV_32S ? 1 : 3e-4;
|
||||
|
||||
checkDeviceMaxMemoryAllocSize(srcSize, stype);
|
||||
checkDeviceMaxMemoryAllocSize(srcSize, dtype);
|
||||
@@ -1178,7 +1177,7 @@ OCL_PERF_TEST_P(ReduceAccFixture, Reduce,
|
||||
|
||||
OCL_TEST_CYCLE() cv::reduce(src, dst, dim, op, dtype);
|
||||
|
||||
SANITY_CHECK(dst, eps);
|
||||
SANITY_CHECK_NOTHING();
|
||||
}
|
||||
|
||||
} } // namespace opencv_test::ocl
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace opencv_test
|
||||
{
|
||||
using namespace perf;
|
||||
|
||||
CV_ENUM(ROp, CV_REDUCE_SUM, CV_REDUCE_AVG, CV_REDUCE_MAX, CV_REDUCE_MIN)
|
||||
CV_ENUM(ROp, REDUCE_SUM, REDUCE_AVG, REDUCE_MAX, REDUCE_MIN, REDUCE_SUM2)
|
||||
typedef tuple<Size, MatType, ROp> Size_MatType_ROp_t;
|
||||
typedef perf::TestBaseWithParam<Size_MatType_ROp_t> Size_MatType_ROp;
|
||||
|
||||
@@ -23,7 +23,7 @@ PERF_TEST_P(Size_MatType_ROp, reduceR,
|
||||
int reduceOp = get<2>(GetParam());
|
||||
|
||||
int ddepth = -1;
|
||||
if( CV_MAT_DEPTH(matType) < CV_32S && (reduceOp == REDUCE_SUM || reduceOp == REDUCE_AVG) )
|
||||
if( CV_MAT_DEPTH(matType) < CV_32S && (reduceOp == REDUCE_SUM || reduceOp == REDUCE_AVG || reduceOp == REDUCE_SUM2) )
|
||||
ddepth = CV_32S;
|
||||
|
||||
Mat src(sz, matType);
|
||||
@@ -35,7 +35,7 @@ PERF_TEST_P(Size_MatType_ROp, reduceR,
|
||||
int runs = 15;
|
||||
TEST_CYCLE_MULTIRUN(runs) reduce(src, vec, 0, reduceOp, ddepth);
|
||||
|
||||
SANITY_CHECK(vec, 1);
|
||||
SANITY_CHECK_NOTHING();
|
||||
}
|
||||
|
||||
PERF_TEST_P(Size_MatType_ROp, reduceC,
|
||||
@@ -51,7 +51,7 @@ PERF_TEST_P(Size_MatType_ROp, reduceC,
|
||||
int reduceOp = get<2>(GetParam());
|
||||
|
||||
int ddepth = -1;
|
||||
if( CV_MAT_DEPTH(matType)< CV_32S && (reduceOp == REDUCE_SUM || reduceOp == REDUCE_AVG) )
|
||||
if( CV_MAT_DEPTH(matType)< CV_32S && (reduceOp == REDUCE_SUM || reduceOp == REDUCE_AVG || reduceOp == REDUCE_SUM2) )
|
||||
ddepth = CV_32S;
|
||||
|
||||
Mat src(sz, matType);
|
||||
@@ -62,7 +62,7 @@ PERF_TEST_P(Size_MatType_ROp, reduceC,
|
||||
|
||||
TEST_CYCLE() reduce(src, vec, 1, reduceOp, ddepth);
|
||||
|
||||
SANITY_CHECK(vec, 1);
|
||||
SANITY_CHECK_NOTHING();
|
||||
}
|
||||
|
||||
typedef tuple<Size, MatType, int> Size_MatType_RMode_t;
|
||||
|
||||
@@ -489,7 +489,7 @@ static bool ocl_arithm_op(InputArray _src1, InputArray _src2, OutputArray _dst,
|
||||
int kercn = haveMask || haveScalar ? cn : ocl::predictOptimalVectorWidth(_src1, _src2, _dst);
|
||||
int scalarcn = kercn == 3 ? 4 : kercn, rowsPerWI = d.isIntel() ? 4 : 1;
|
||||
|
||||
char cvtstr[4][32], opts[1024];
|
||||
char cvtstr[4][50], opts[1024];
|
||||
snprintf(opts, sizeof(opts), "-D %s%s -D %s -D srcT1=%s -D srcT1_C1=%s -D srcT2=%s -D srcT2_C1=%s "
|
||||
"-D dstT=%s -D DEPTH_dst=%d -D dstT_C1=%s -D workT=%s -D workST=%s -D scaleT=%s -D wdepth=%d -D convertToWT1=%s "
|
||||
"-D convertToWT2=%s -D convertToDT=%s%s -D cn=%d -D rowsPerWI=%d -D convertFromU=%s",
|
||||
@@ -500,12 +500,12 @@ static bool ocl_arithm_op(InputArray _src1, InputArray _src2, OutputArray _dst,
|
||||
ocl::typeToStr(ddepth), ocl::typeToStr(CV_MAKETYPE(wdepth, kercn)),
|
||||
ocl::typeToStr(CV_MAKETYPE(wdepth, scalarcn)),
|
||||
ocl::typeToStr(wdepth), wdepth,
|
||||
ocl::convertTypeStr(depth1, wdepth, kercn, cvtstr[0]),
|
||||
ocl::convertTypeStr(depth2, wdepth, kercn, cvtstr[1]),
|
||||
ocl::convertTypeStr(wdepth, ddepth, kercn, cvtstr[2]),
|
||||
ocl::convertTypeStr(depth1, wdepth, kercn, cvtstr[0], sizeof(cvtstr[0])),
|
||||
ocl::convertTypeStr(depth2, wdepth, kercn, cvtstr[1], sizeof(cvtstr[1])),
|
||||
ocl::convertTypeStr(wdepth, ddepth, kercn, cvtstr[2], sizeof(cvtstr[2])),
|
||||
doubleSupport ? " -D DOUBLE_SUPPORT" : "", kercn, rowsPerWI,
|
||||
oclop == OCL_OP_ABSDIFF && wdepth == CV_32S && ddepth == wdepth ?
|
||||
ocl::convertTypeStr(CV_8U, ddepth, kercn, cvtstr[3]) : "noconvert");
|
||||
ocl::convertTypeStr(CV_8U, ddepth, kercn, cvtstr[3], sizeof(cvtstr[3])) : "noconvert");
|
||||
|
||||
size_t usrdata_esz = CV_ELEM_SIZE(wdepth);
|
||||
const uchar* usrdata_p = (const uchar*)usrdata;
|
||||
@@ -1098,7 +1098,7 @@ static bool ocl_compare(InputArray _src1, InputArray _src2, OutputArray _dst, in
|
||||
|
||||
int scalarcn = kercn == 3 ? 4 : kercn;
|
||||
const char * const operationMap[] = { "==", ">", ">=", "<", "<=", "!=" };
|
||||
char cvt[40];
|
||||
char cvt[50];
|
||||
|
||||
String opts = format("-D %s -D srcT1=%s -D dstT=%s -D DEPTH_dst=%d -D workT=srcT1 -D cn=%d"
|
||||
" -D convertToDT=%s -D OP_CMP -D CMP_OPERATOR=%s -D srcT1_C1=%s"
|
||||
@@ -1106,7 +1106,7 @@ static bool ocl_compare(InputArray _src1, InputArray _src2, OutputArray _dst, in
|
||||
haveScalar ? "UNARY_OP" : "BINARY_OP",
|
||||
ocl::typeToStr(CV_MAKE_TYPE(depth1, kercn)),
|
||||
ocl::typeToStr(CV_8UC(kercn)), CV_8U, kercn,
|
||||
ocl::convertTypeStr(depth1, CV_8U, kercn, cvt),
|
||||
ocl::convertTypeStr(depth1, CV_8U, kercn, cvt, sizeof(cvt)),
|
||||
operationMap[op], ocl::typeToStr(depth1),
|
||||
ocl::typeToStr(depth1), ocl::typeToStr(CV_8U),
|
||||
ocl::typeToStr(CV_MAKE_TYPE(depth1, scalarcn)), rowsPerWI,
|
||||
|
||||
@@ -59,8 +59,8 @@ static bool ocl_convertScaleAbs( InputArray _src, OutputArray _dst, double alpha
|
||||
ocl::typeToStr(CV_8UC(kercn)), CV_8U,
|
||||
ocl::typeToStr(CV_MAKE_TYPE(depth, kercn)),
|
||||
ocl::typeToStr(CV_MAKE_TYPE(wdepth, kercn)), wdepth,
|
||||
ocl::convertTypeStr(depth, wdepth, kercn, cvt[0]),
|
||||
ocl::convertTypeStr(wdepth, CV_8U, kercn, cvt[1]),
|
||||
ocl::convertTypeStr(depth, wdepth, kercn, cvt[0], sizeof(cvt[0])),
|
||||
ocl::convertTypeStr(wdepth, CV_8U, kercn, cvt[1], sizeof(cvt[1])),
|
||||
ocl::typeToStr(wdepth), rowsPerWI,
|
||||
doubleSupport ? " -D DOUBLE_SUPPORT" : "");
|
||||
ocl::Kernel k("KF", ocl::core::arithm_oclsrc, build_opt);
|
||||
|
||||
@@ -62,10 +62,6 @@ static bool ipp_countNonZero( Mat &src, int &res )
|
||||
{
|
||||
CV_INSTRUMENT_REGION_IPP();
|
||||
|
||||
// see https://github.com/opencv/opencv/issues/17453
|
||||
if (src.dims <= 2 && src.step > 520000 && cv::ipp::getIppTopFeatures() == ippCPUID_SSE42)
|
||||
return false;
|
||||
|
||||
#if IPP_VERSION_X100 < 201801
|
||||
// Poor performance of SSE42
|
||||
if(cv::ipp::getIppTopFeatures() == ippCPUID_SSE42)
|
||||
|
||||
@@ -586,6 +586,15 @@ Stream cv::cuda::StreamAccessor::wrapStream(cudaStream_t stream)
|
||||
|
||||
#endif
|
||||
|
||||
Stream cv::cuda::wrapStream(size_t cudaStreamMemoryAddress) {
|
||||
#ifndef HAVE_CUDA
|
||||
CV_UNUSED(cudaStreamMemoryAddress);
|
||||
throw_no_cuda();
|
||||
#else
|
||||
return cv::cuda::StreamAccessor::wrapStream(reinterpret_cast<cudaStream_t>(cudaStreamMemoryAddress));
|
||||
#endif
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
/// StackAllocator
|
||||
|
||||
|
||||
@@ -531,7 +531,7 @@ inline int hal_ni_dftFree1D(cvhalDFT *context) { return CV_HAL_ERROR_NOT_IMPLEME
|
||||
/**
|
||||
@param context double pointer to context storing all necessary data
|
||||
@param width,height image dimensions
|
||||
@param depth image type (CV_32F or CV64F)
|
||||
@param depth image type (CV_32F or CV_64F)
|
||||
@param src_channels number of channels in input image
|
||||
@param dst_channels number of channels in output image
|
||||
@param flags algorithm options (combination of CV_HAL_DFT_INVERSE, ...)
|
||||
@@ -558,7 +558,7 @@ inline int hal_ni_dftFree2D(cvhalDFT *context) { return CV_HAL_ERROR_NOT_IMPLEME
|
||||
/**
|
||||
@param context double pointer to context storing all necessary data
|
||||
@param width,height image dimensions
|
||||
@param depth image type (CV_32F or CV64F)
|
||||
@param depth image type (CV_32F or CV_64F)
|
||||
@param flags algorithm options (combination of CV_HAL_DFT_INVERSE, ...)
|
||||
*/
|
||||
inline int hal_ni_dctInit2D(cvhalDFT **context, int width, int height, int depth, int flags) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
|
||||
|
||||
@@ -7,10 +7,6 @@
|
||||
#include "mathfuncs_core.simd.hpp"
|
||||
#include "mathfuncs_core.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content
|
||||
|
||||
|
||||
#define IPP_DISABLE_MAGNITUDE_32F 1 // accuracy: https://github.com/opencv/opencv/issues/19506
|
||||
|
||||
|
||||
namespace cv { namespace hal {
|
||||
|
||||
///////////////////////////////////// ATAN2 ////////////////////////////////////
|
||||
@@ -48,25 +44,8 @@ void magnitude32f(const float* x, const float* y, float* mag, int len)
|
||||
CV_INSTRUMENT_REGION();
|
||||
|
||||
CALL_HAL(magnitude32f, cv_hal_magnitude32f, x, y, mag, len);
|
||||
|
||||
#ifdef HAVE_IPP
|
||||
bool allowIPP = true;
|
||||
#ifdef IPP_DISABLE_MAGNITUDE_32F
|
||||
if (cv::ipp::getIppTopFeatures() & (
|
||||
#if IPP_VERSION_X100 >= 201700
|
||||
ippCPUID_AVX512F |
|
||||
#endif
|
||||
ippCPUID_AVX2)
|
||||
)
|
||||
{
|
||||
allowIPP = (len & 7) == 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
// SSE42 performance issues
|
||||
CV_IPP_RUN((IPP_VERSION_X100 > 201800 || cv::ipp::getIppTopFeatures() != ippCPUID_SSE42) && allowIPP,
|
||||
CV_INSTRUMENT_FUN_IPP(ippsMagnitude_32f, x, y, mag, len) >= 0);
|
||||
#endif
|
||||
CV_IPP_RUN(IPP_VERSION_X100 > 201800 || cv::ipp::getIppTopFeatures() != ippCPUID_SSE42, CV_INSTRUMENT_FUN_IPP(ippsMagnitude_32f, x, y, mag, len) >= 0);
|
||||
|
||||
CV_CPU_DISPATCH(magnitude32f, (x, y, mag, len),
|
||||
CV_CPU_DISPATCH_MODES_ALL);
|
||||
|
||||
@@ -606,8 +606,8 @@ static bool ocl_scaleAdd( InputArray _src1, double alpha, InputArray _src2, Outp
|
||||
" -D wdepth=%d%s -D rowsPerWI=%d",
|
||||
ocl::typeToStr(CV_MAKE_TYPE(depth, kercn)), depth,
|
||||
ocl::typeToStr(CV_MAKE_TYPE(wdepth, kercn)),
|
||||
ocl::convertTypeStr(depth, wdepth, kercn, cvt[0]),
|
||||
ocl::convertTypeStr(wdepth, depth, kercn, cvt[1]),
|
||||
ocl::convertTypeStr(depth, wdepth, kercn, cvt[0], sizeof(cvt[0])),
|
||||
ocl::convertTypeStr(wdepth, depth, kercn, cvt[1], sizeof(cvt[1])),
|
||||
ocl::typeToStr(wdepth), wdepth,
|
||||
doubleSupport ? " -D DOUBLE_SUPPORT" : "", rowsPerWI));
|
||||
if (k.empty())
|
||||
@@ -1041,13 +1041,13 @@ static bool ocl_dot( InputArray _src1, InputArray _src2, double & res )
|
||||
wgs2_aligned <<= 1;
|
||||
wgs2_aligned >>= 1;
|
||||
|
||||
char cvt[40];
|
||||
char cvt[50];
|
||||
ocl::Kernel k("reduce", ocl::core::reduce_oclsrc,
|
||||
format("-D srcT=%s -D srcT1=%s -D dstT=%s -D dstTK=%s -D ddepth=%d -D convertToDT=%s -D OP_DOT "
|
||||
"-D WGS=%d -D WGS2_ALIGNED=%d%s%s%s -D kercn=%d",
|
||||
ocl::typeToStr(CV_MAKE_TYPE(depth, kercn)), ocl::typeToStr(depth),
|
||||
ocl::typeToStr(ddepth), ocl::typeToStr(CV_MAKE_TYPE(ddepth, kercn)),
|
||||
ddepth, ocl::convertTypeStr(depth, ddepth, kercn, cvt),
|
||||
ddepth, ocl::convertTypeStr(depth, ddepth, kercn, cvt, sizeof(cvt)),
|
||||
(int)wgs, wgs2_aligned, doubleSupport ? " -D DOUBLE_SUPPORT" : "",
|
||||
_src1.isContinuous() ? " -D HAVE_SRC_CONT" : "",
|
||||
_src2.isContinuous() ? " -D HAVE_SRC2_CONT" : "", kercn));
|
||||
|
||||
@@ -341,29 +341,32 @@ cv::Mat cv::Mat::cross(InputArray _m) const
|
||||
namespace cv
|
||||
{
|
||||
|
||||
template<typename T, typename ST, class Op> static void
|
||||
reduceR_( const Mat& srcmat, Mat& dstmat )
|
||||
template<typename T, typename ST, typename WT, class Op, class OpInit>
|
||||
class ReduceR_Invoker : public ParallelLoopBody
|
||||
{
|
||||
typedef typename Op::rtype WT;
|
||||
Size size = srcmat.size();
|
||||
size.width *= srcmat.channels();
|
||||
AutoBuffer<WT> buffer(size.width);
|
||||
public:
|
||||
ReduceR_Invoker(const Mat& aSrcmat, Mat& aDstmat, Op& aOp, OpInit& aOpInit)
|
||||
:srcmat(aSrcmat),dstmat(aDstmat),op(aOp),opInit(aOpInit),buffer(srcmat.size().width*srcmat.channels())
|
||||
{
|
||||
}
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
const T* src = srcmat.ptr<T>();
|
||||
const size_t srcstep = srcmat.step/sizeof(src[0]);
|
||||
WT* buf = buffer.data();
|
||||
ST* dst = dstmat.ptr<ST>();
|
||||
const T* src = srcmat.ptr<T>();
|
||||
size_t srcstep = srcmat.step/sizeof(src[0]);
|
||||
int i;
|
||||
Op op;
|
||||
int i = 0;
|
||||
|
||||
for( i = 0; i < size.width; i++ )
|
||||
buf[i] = src[i];
|
||||
for( i = range.start ; i < range.end; i++ )
|
||||
buf[i] = opInit(src[i]);
|
||||
|
||||
for( ; --size.height; )
|
||||
int height = srcmat.size().height;
|
||||
for( ; --height; )
|
||||
{
|
||||
src += srcstep;
|
||||
i = 0;
|
||||
i = range.start;
|
||||
#if CV_ENABLE_UNROLLED
|
||||
for(; i <= size.width - 4; i += 4 )
|
||||
for(; i <= range.end - 4; i += 4 )
|
||||
{
|
||||
WT s0, s1;
|
||||
s0 = op(buf[i], (WT)src[i]);
|
||||
@@ -375,63 +378,94 @@ reduceR_( const Mat& srcmat, Mat& dstmat )
|
||||
buf[i+2] = s0; buf[i+3] = s1;
|
||||
}
|
||||
#endif
|
||||
for( ; i < size.width; i++ )
|
||||
for( ; i < range.end; i++ )
|
||||
buf[i] = op(buf[i], (WT)src[i]);
|
||||
}
|
||||
|
||||
for( i = 0; i < size.width; i++ )
|
||||
for( i = range.start ; i < range.end; i++ )
|
||||
dst[i] = (ST)buf[i];
|
||||
}
|
||||
}
|
||||
private:
|
||||
const Mat& srcmat;
|
||||
Mat& dstmat;
|
||||
Op& op;
|
||||
OpInit& opInit;
|
||||
mutable AutoBuffer<WT> buffer;
|
||||
};
|
||||
|
||||
|
||||
template<typename T, typename ST, class Op> static void
|
||||
reduceC_( const Mat& srcmat, Mat& dstmat )
|
||||
template<typename T, typename ST, class Op, class OpInit = OpNop<ST> > static void
|
||||
reduceR_( const Mat& srcmat, Mat& dstmat)
|
||||
{
|
||||
typedef typename Op::rtype WT;
|
||||
Size size = srcmat.size();
|
||||
int cn = srcmat.channels();
|
||||
size.width *= cn;
|
||||
Op op;
|
||||
OpInit opInit;
|
||||
|
||||
for( int y = 0; y < size.height; y++ )
|
||||
ReduceR_Invoker<T, ST, WT, Op, OpInit> body(srcmat, dstmat, op, opInit);
|
||||
//group columns by 64 bytes for data locality
|
||||
parallel_for_(Range(0, srcmat.size().width*srcmat.channels()), body, srcmat.size().width*CV_ELEM_SIZE(srcmat.depth())/64);
|
||||
}
|
||||
|
||||
template<typename T, typename ST, typename WT, class Op, class OpInit>
|
||||
class ReduceC_Invoker : public ParallelLoopBody
|
||||
{
|
||||
public:
|
||||
ReduceC_Invoker(const Mat& aSrcmat, Mat& aDstmat, Op& aOp, OpInit& aOpInit)
|
||||
:srcmat(aSrcmat),dstmat(aDstmat),op(aOp),opInit(aOpInit)
|
||||
{
|
||||
}
|
||||
void operator()(const Range& range) const CV_OVERRIDE
|
||||
{
|
||||
const int cn = srcmat.channels();
|
||||
const int width = srcmat.size().width*cn;
|
||||
AutoBuffer<WT> cumul(cn);
|
||||
for( int y = range.start; y < range.end; y++ )
|
||||
{
|
||||
const T* src = srcmat.ptr<T>(y);
|
||||
ST* dst = dstmat.ptr<ST>(y);
|
||||
if( size.width == cn )
|
||||
for( int k = 0; k < cn; k++ )
|
||||
dst[k] = src[k];
|
||||
if( width == cn )
|
||||
{
|
||||
for( int k = 0; k < cn; k++ )
|
||||
dst[k] = (ST)opInit(src[k]);
|
||||
}
|
||||
else
|
||||
{
|
||||
for( int k = 0; k < cn; k++ )
|
||||
for(int k = 0; k < cn ; ++k )
|
||||
cumul[k] = opInit(src[k]);
|
||||
for(int k = cn ; k < width ; k += cn )
|
||||
{
|
||||
WT a0 = src[k], a1 = src[k+cn];
|
||||
int i;
|
||||
for( i = 2*cn; i <= size.width - 4*cn; i += 4*cn )
|
||||
{
|
||||
a0 = op(a0, (WT)src[i+k]);
|
||||
a1 = op(a1, (WT)src[i+k+cn]);
|
||||
a0 = op(a0, (WT)src[i+k+cn*2]);
|
||||
a1 = op(a1, (WT)src[i+k+cn*3]);
|
||||
}
|
||||
|
||||
for( ; i < size.width; i += cn )
|
||||
{
|
||||
a0 = op(a0, (WT)src[i+k]);
|
||||
}
|
||||
a0 = op(a0, a1);
|
||||
dst[k] = (ST)a0;
|
||||
for (int c = 0 ; c < cn ; ++c)
|
||||
cumul[c] = op(cumul[c], src[k+c]);
|
||||
}
|
||||
for(int k = 0 ; k < cn ; ++k )
|
||||
dst[k] = (ST)cumul[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
private:
|
||||
const Mat& srcmat;
|
||||
Mat& dstmat;
|
||||
Op& op;
|
||||
OpInit& opInit;
|
||||
};
|
||||
|
||||
template<typename T, typename ST, class Op, class OpInit = OpNop<ST> > static void
|
||||
reduceC_( const Mat& srcmat, Mat& dstmat)
|
||||
{
|
||||
typedef typename Op::rtype WT;
|
||||
Op op;
|
||||
OpInit opInit;
|
||||
|
||||
ReduceC_Invoker<T, ST, WT, Op, OpInit> body(srcmat, dstmat, op, opInit);
|
||||
parallel_for_(Range(0, srcmat.size().height), body);
|
||||
}
|
||||
|
||||
typedef void (*ReduceFunc)( const Mat& src, Mat& dst );
|
||||
|
||||
}
|
||||
|
||||
#define reduceSumR8u32s reduceR_<uchar, int, OpAdd<int> >
|
||||
#define reduceSumR8u32f reduceR_<uchar, float, OpAdd<int> >
|
||||
#define reduceSumR8u64f reduceR_<uchar, double,OpAdd<int> >
|
||||
#define reduceSumR8u32s reduceR_<uchar, int, OpAdd<int>, OpNop<int> >
|
||||
#define reduceSumR8u32f reduceR_<uchar, float, OpAdd<int>, OpNop<int> >
|
||||
#define reduceSumR8u64f reduceR_<uchar, double,OpAdd<int>, OpNop<int> >
|
||||
#define reduceSumR16u32f reduceR_<ushort,float, OpAdd<float> >
|
||||
#define reduceSumR16u64f reduceR_<ushort,double,OpAdd<double> >
|
||||
#define reduceSumR16s32f reduceR_<short, float, OpAdd<float> >
|
||||
@@ -440,6 +474,17 @@ typedef void (*ReduceFunc)( const Mat& src, Mat& dst );
|
||||
#define reduceSumR32f64f reduceR_<float, double,OpAdd<double> >
|
||||
#define reduceSumR64f64f reduceR_<double,double,OpAdd<double> >
|
||||
|
||||
#define reduceSum2R8u32s reduceR_<uchar, int, OpAddSqr<int>, OpSqr<int> >
|
||||
#define reduceSum2R8u32f reduceR_<uchar, float, OpAddSqr<int>, OpSqr<int> >
|
||||
#define reduceSum2R8u64f reduceR_<uchar, double,OpAddSqr<int>, OpSqr<int> >
|
||||
#define reduceSum2R16u32f reduceR_<ushort,float, OpAddSqr<float>, OpSqr<float> >
|
||||
#define reduceSum2R16u64f reduceR_<ushort,double,OpAddSqr<double>,OpSqr<double> >
|
||||
#define reduceSum2R16s32f reduceR_<short, float, OpAddSqr<float>, OpSqr<float> >
|
||||
#define reduceSum2R16s64f reduceR_<short, double,OpAddSqr<double>,OpSqr<double> >
|
||||
#define reduceSum2R32f32f reduceR_<float, float, OpAddSqr<float>, OpSqr<float> >
|
||||
#define reduceSum2R32f64f reduceR_<float, double,OpAddSqr<double>,OpSqr<double> >
|
||||
#define reduceSum2R64f64f reduceR_<double,double,OpAddSqr<double>,OpSqr<double> >
|
||||
|
||||
#define reduceMaxR8u reduceR_<uchar, uchar, OpMax<uchar> >
|
||||
#define reduceMaxR16u reduceR_<ushort,ushort,OpMax<ushort> >
|
||||
#define reduceMaxR16s reduceR_<short, short, OpMax<short> >
|
||||
@@ -527,23 +572,35 @@ static inline void reduceSumC_8u16u16s32f_64f(const cv::Mat& srcmat, cv::Mat& ds
|
||||
|
||||
#endif
|
||||
|
||||
#define reduceSumC8u32s reduceC_<uchar, int, OpAdd<int> >
|
||||
#define reduceSumC8u32f reduceC_<uchar, float, OpAdd<int> >
|
||||
#define reduceSumC8u32s reduceC_<uchar, int, OpAdd<int>, OpNop<int> >
|
||||
#define reduceSumC8u32f reduceC_<uchar, float, OpAdd<int>, OpNop<int> >
|
||||
#define reduceSumC16u32f reduceC_<ushort,float, OpAdd<float> >
|
||||
#define reduceSumC16s32f reduceC_<short, float, OpAdd<float> >
|
||||
#define reduceSumC32f32f reduceC_<float, float, OpAdd<float> >
|
||||
#define reduceSumC64f64f reduceC_<double,double,OpAdd<double> >
|
||||
|
||||
#define reduceSum2C8u32s reduceC_<uchar, int, OpAddSqr<int>, OpSqr<int> >
|
||||
#define reduceSum2C8u32f reduceC_<uchar, float, OpAddSqr<int>, OpSqr<int> >
|
||||
#define reduceSum2C16u32f reduceC_<ushort,float, OpAddSqr<float>, OpSqr<float> >
|
||||
#define reduceSum2C16s32f reduceC_<short, float, OpAddSqr<float>, OpSqr<float> >
|
||||
#define reduceSum2C32f32f reduceC_<float, float, OpAddSqr<float>, OpSqr<float> >
|
||||
#define reduceSum2C64f64f reduceC_<double,double,OpAddSqr<double>,OpSqr<double> >
|
||||
|
||||
#ifdef HAVE_IPP
|
||||
#define reduceSumC8u64f reduceSumC_8u16u16s32f_64f
|
||||
#define reduceSumC16u64f reduceSumC_8u16u16s32f_64f
|
||||
#define reduceSumC16s64f reduceSumC_8u16u16s32f_64f
|
||||
#define reduceSumC32f64f reduceSumC_8u16u16s32f_64f
|
||||
#else
|
||||
#define reduceSumC8u64f reduceC_<uchar, double,OpAdd<int> >
|
||||
#define reduceSumC8u64f reduceC_<uchar, double,OpAdd<int>, OpNop<int> >
|
||||
#define reduceSumC16u64f reduceC_<ushort,double,OpAdd<double> >
|
||||
#define reduceSumC16s64f reduceC_<short, double,OpAdd<double> >
|
||||
#define reduceSumC32f64f reduceC_<float, double,OpAdd<double> >
|
||||
|
||||
#define reduceSum2C8u64f reduceC_<uchar, double,OpAddSqr<int>, OpSqr<int> >
|
||||
#define reduceSum2C16u64f reduceC_<ushort,double,OpAddSqr<double>,OpSqr<double> >
|
||||
#define reduceSum2C16s64f reduceC_<short, double,OpAddSqr<double>,OpSqr<double> >
|
||||
#define reduceSum2C32f64f reduceC_<float, double,OpAddSqr<double>,OpSqr<double> >
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IPP
|
||||
@@ -622,8 +679,9 @@ static bool ocl_reduce(InputArray _src, OutputArray _dst,
|
||||
ddepth = CV_32S;
|
||||
}
|
||||
|
||||
const char * const ops[4] = { "OCL_CV_REDUCE_SUM", "OCL_CV_REDUCE_AVG",
|
||||
"OCL_CV_REDUCE_MAX", "OCL_CV_REDUCE_MIN" };
|
||||
const char * const ops[5] = { "OCL_CV_REDUCE_SUM", "OCL_CV_REDUCE_AVG",
|
||||
"OCL_CV_REDUCE_MAX", "OCL_CV_REDUCE_MIN",
|
||||
"OCL_CV_REDUCE_SUM2"};
|
||||
int wdepth = std::max(ddepth, CV_32F);
|
||||
if (useOptimized)
|
||||
{
|
||||
@@ -633,7 +691,7 @@ static bool ocl_reduce(InputArray _src, OutputArray _dst,
|
||||
static const size_t maxItemInGroupCount = 16;
|
||||
tileHeight = min(tileHeight, defDev.localMemSize() / buf_cols / CV_ELEM_SIZE(CV_MAKETYPE(wdepth, cn)) / maxItemInGroupCount);
|
||||
}
|
||||
char cvt[3][40];
|
||||
char cvt[3][50];
|
||||
cv::String build_opt = format("-D OP_REDUCE_PRE -D BUF_COLS=%d -D TILE_HEIGHT=%zu -D %s -D dim=1"
|
||||
" -D cn=%d -D ddepth=%d"
|
||||
" -D srcT=%s -D bufT=%s -D dstT=%s"
|
||||
@@ -642,9 +700,9 @@ static bool ocl_reduce(InputArray _src, OutputArray _dst,
|
||||
ocl::typeToStr(sdepth),
|
||||
ocl::typeToStr(ddepth),
|
||||
ocl::typeToStr(ddepth0),
|
||||
ocl::convertTypeStr(ddepth, wdepth, 1, cvt[0]),
|
||||
ocl::convertTypeStr(sdepth, ddepth, 1, cvt[1]),
|
||||
ocl::convertTypeStr(wdepth, ddepth0, 1, cvt[2]),
|
||||
ocl::convertTypeStr(ddepth, wdepth, 1, cvt[0], sizeof(cvt[0])),
|
||||
ocl::convertTypeStr(sdepth, ddepth, 1, cvt[1], sizeof(cvt[1])),
|
||||
ocl::convertTypeStr(wdepth, ddepth0, 1, cvt[2], sizeof(cvt[2])),
|
||||
doubleSupport ? " -D DOUBLE_SUPPORT" : "");
|
||||
ocl::Kernel k("reduce_horz_opt", ocl::core::reduce2_oclsrc, build_opt);
|
||||
if (k.empty())
|
||||
@@ -667,15 +725,15 @@ static bool ocl_reduce(InputArray _src, OutputArray _dst,
|
||||
}
|
||||
else
|
||||
{
|
||||
char cvt[2][40];
|
||||
char cvt[2][50];
|
||||
cv::String build_opt = format("-D %s -D dim=%d -D cn=%d -D ddepth=%d"
|
||||
" -D srcT=%s -D dstT=%s -D dstT0=%s -D convertToWT=%s"
|
||||
" -D convertToDT=%s -D convertToDT0=%s%s",
|
||||
ops[op], dim, cn, ddepth, ocl::typeToStr(useOptimized ? ddepth : sdepth),
|
||||
ocl::typeToStr(ddepth), ocl::typeToStr(ddepth0),
|
||||
ocl::convertTypeStr(ddepth, wdepth, 1, cvt[0]),
|
||||
ocl::convertTypeStr(sdepth, ddepth, 1, cvt[0]),
|
||||
ocl::convertTypeStr(wdepth, ddepth0, 1, cvt[1]),
|
||||
ocl::convertTypeStr(ddepth, wdepth, 1, cvt[0], sizeof(cvt[0])),
|
||||
ocl::convertTypeStr(sdepth, ddepth, 1, cvt[0], sizeof(cvt[0])),
|
||||
ocl::convertTypeStr(wdepth, ddepth0, 1, cvt[1], sizeof(cvt[1])),
|
||||
doubleSupport ? " -D DOUBLE_SUPPORT" : "");
|
||||
|
||||
ocl::Kernel k("reduce", ocl::core::reduce2_oclsrc, build_opt);
|
||||
@@ -718,7 +776,8 @@ void cv::reduce(InputArray _src, OutputArray _dst, int dim, int op, int dtype)
|
||||
|
||||
CV_Assert( cn == CV_MAT_CN(dtype) );
|
||||
CV_Assert( op == REDUCE_SUM || op == REDUCE_MAX ||
|
||||
op == REDUCE_MIN || op == REDUCE_AVG );
|
||||
op == REDUCE_MIN || op == REDUCE_AVG ||
|
||||
op == REDUCE_SUM2);
|
||||
|
||||
CV_OCL_RUN(_dst.isUMat(),
|
||||
ocl_reduce(_src, _dst, dim, op, op0, stype, dtype))
|
||||
@@ -748,7 +807,7 @@ void cv::reduce(InputArray _src, OutputArray _dst, int dim, int op, int dtype)
|
||||
if( op == REDUCE_SUM )
|
||||
{
|
||||
if(sdepth == CV_8U && ddepth == CV_32S)
|
||||
func = GET_OPTIMIZED(reduceSumR8u32s);
|
||||
func = reduceSumR8u32s;
|
||||
else if(sdepth == CV_8U && ddepth == CV_32F)
|
||||
func = reduceSumR8u32f;
|
||||
else if(sdepth == CV_8U && ddepth == CV_64F)
|
||||
@@ -762,7 +821,7 @@ void cv::reduce(InputArray _src, OutputArray _dst, int dim, int op, int dtype)
|
||||
else if(sdepth == CV_16S && ddepth == CV_64F)
|
||||
func = reduceSumR16s64f;
|
||||
else if(sdepth == CV_32F && ddepth == CV_32F)
|
||||
func = GET_OPTIMIZED(reduceSumR32f32f);
|
||||
func = reduceSumR32f32f;
|
||||
else if(sdepth == CV_32F && ddepth == CV_64F)
|
||||
func = reduceSumR32f64f;
|
||||
else if(sdepth == CV_64F && ddepth == CV_64F)
|
||||
@@ -771,36 +830,59 @@ void cv::reduce(InputArray _src, OutputArray _dst, int dim, int op, int dtype)
|
||||
else if(op == REDUCE_MAX)
|
||||
{
|
||||
if(sdepth == CV_8U && ddepth == CV_8U)
|
||||
func = GET_OPTIMIZED(reduceMaxR8u);
|
||||
func = reduceMaxR8u;
|
||||
else if(sdepth == CV_16U && ddepth == CV_16U)
|
||||
func = reduceMaxR16u;
|
||||
else if(sdepth == CV_16S && ddepth == CV_16S)
|
||||
func = reduceMaxR16s;
|
||||
else if(sdepth == CV_32F && ddepth == CV_32F)
|
||||
func = GET_OPTIMIZED(reduceMaxR32f);
|
||||
func = reduceMaxR32f;
|
||||
else if(sdepth == CV_64F && ddepth == CV_64F)
|
||||
func = reduceMaxR64f;
|
||||
}
|
||||
else if(op == REDUCE_MIN)
|
||||
{
|
||||
if(sdepth == CV_8U && ddepth == CV_8U)
|
||||
func = GET_OPTIMIZED(reduceMinR8u);
|
||||
func = reduceMinR8u;
|
||||
else if(sdepth == CV_16U && ddepth == CV_16U)
|
||||
func = reduceMinR16u;
|
||||
else if(sdepth == CV_16S && ddepth == CV_16S)
|
||||
func = reduceMinR16s;
|
||||
else if(sdepth == CV_32F && ddepth == CV_32F)
|
||||
func = GET_OPTIMIZED(reduceMinR32f);
|
||||
func = reduceMinR32f;
|
||||
else if(sdepth == CV_64F && ddepth == CV_64F)
|
||||
func = reduceMinR64f;
|
||||
}
|
||||
else if( op == REDUCE_SUM2 )
|
||||
{
|
||||
if(sdepth == CV_8U && ddepth == CV_32S)
|
||||
func = reduceSum2R8u32s;
|
||||
else if(sdepth == CV_8U && ddepth == CV_32F)
|
||||
func = reduceSum2R8u32f;
|
||||
else if(sdepth == CV_8U && ddepth == CV_64F)
|
||||
func = reduceSum2R8u64f;
|
||||
else if(sdepth == CV_16U && ddepth == CV_32F)
|
||||
func = reduceSum2R16u32f;
|
||||
else if(sdepth == CV_16U && ddepth == CV_64F)
|
||||
func = reduceSum2R16u64f;
|
||||
else if(sdepth == CV_16S && ddepth == CV_32F)
|
||||
func = reduceSum2R16s32f;
|
||||
else if(sdepth == CV_16S && ddepth == CV_64F)
|
||||
func = reduceSum2R16s64f;
|
||||
else if(sdepth == CV_32F && ddepth == CV_32F)
|
||||
func = reduceSum2R32f32f;
|
||||
else if(sdepth == CV_32F && ddepth == CV_64F)
|
||||
func = reduceSum2R32f64f;
|
||||
else if(sdepth == CV_64F && ddepth == CV_64F)
|
||||
func = reduceSum2R64f64f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(op == REDUCE_SUM)
|
||||
{
|
||||
if(sdepth == CV_8U && ddepth == CV_32S)
|
||||
func = GET_OPTIMIZED(reduceSumC8u32s);
|
||||
func = reduceSumC8u32s;
|
||||
else if(sdepth == CV_8U && ddepth == CV_32F)
|
||||
func = reduceSumC8u32f;
|
||||
else if(sdepth == CV_8U && ddepth == CV_64F)
|
||||
@@ -814,7 +896,7 @@ void cv::reduce(InputArray _src, OutputArray _dst, int dim, int op, int dtype)
|
||||
else if(sdepth == CV_16S && ddepth == CV_64F)
|
||||
func = reduceSumC16s64f;
|
||||
else if(sdepth == CV_32F && ddepth == CV_32F)
|
||||
func = GET_OPTIMIZED(reduceSumC32f32f);
|
||||
func = reduceSumC32f32f;
|
||||
else if(sdepth == CV_32F && ddepth == CV_64F)
|
||||
func = reduceSumC32f64f;
|
||||
else if(sdepth == CV_64F && ddepth == CV_64F)
|
||||
@@ -823,29 +905,52 @@ void cv::reduce(InputArray _src, OutputArray _dst, int dim, int op, int dtype)
|
||||
else if(op == REDUCE_MAX)
|
||||
{
|
||||
if(sdepth == CV_8U && ddepth == CV_8U)
|
||||
func = GET_OPTIMIZED(reduceMaxC8u);
|
||||
func = reduceMaxC8u;
|
||||
else if(sdepth == CV_16U && ddepth == CV_16U)
|
||||
func = reduceMaxC16u;
|
||||
else if(sdepth == CV_16S && ddepth == CV_16S)
|
||||
func = reduceMaxC16s;
|
||||
else if(sdepth == CV_32F && ddepth == CV_32F)
|
||||
func = GET_OPTIMIZED(reduceMaxC32f);
|
||||
func = reduceMaxC32f;
|
||||
else if(sdepth == CV_64F && ddepth == CV_64F)
|
||||
func = reduceMaxC64f;
|
||||
}
|
||||
else if(op == REDUCE_MIN)
|
||||
{
|
||||
if(sdepth == CV_8U && ddepth == CV_8U)
|
||||
func = GET_OPTIMIZED(reduceMinC8u);
|
||||
func = reduceMinC8u;
|
||||
else if(sdepth == CV_16U && ddepth == CV_16U)
|
||||
func = reduceMinC16u;
|
||||
else if(sdepth == CV_16S && ddepth == CV_16S)
|
||||
func = reduceMinC16s;
|
||||
else if(sdepth == CV_32F && ddepth == CV_32F)
|
||||
func = GET_OPTIMIZED(reduceMinC32f);
|
||||
func = reduceMinC32f;
|
||||
else if(sdepth == CV_64F && ddepth == CV_64F)
|
||||
func = reduceMinC64f;
|
||||
}
|
||||
else if(op == REDUCE_SUM2)
|
||||
{
|
||||
if(sdepth == CV_8U && ddepth == CV_32S)
|
||||
func = reduceSum2C8u32s;
|
||||
else if(sdepth == CV_8U && ddepth == CV_32F)
|
||||
func = reduceSum2C8u32f;
|
||||
else if(sdepth == CV_8U && ddepth == CV_64F)
|
||||
func = reduceSum2C8u64f;
|
||||
else if(sdepth == CV_16U && ddepth == CV_32F)
|
||||
func = reduceSum2C16u32f;
|
||||
else if(sdepth == CV_16U && ddepth == CV_64F)
|
||||
func = reduceSum2C16u64f;
|
||||
else if(sdepth == CV_16S && ddepth == CV_32F)
|
||||
func = reduceSum2C16s32f;
|
||||
else if(sdepth == CV_16S && ddepth == CV_64F)
|
||||
func = reduceSum2C16s64f;
|
||||
else if(sdepth == CV_32F && ddepth == CV_32F)
|
||||
func = reduceSum2C32f32f;
|
||||
else if(sdepth == CV_32F && ddepth == CV_64F)
|
||||
func = reduceSum2C32f64f;
|
||||
else if(sdepth == CV_64F && ddepth == CV_64F)
|
||||
func = reduceSum2C64f64f;
|
||||
}
|
||||
}
|
||||
|
||||
if( !func )
|
||||
|
||||
@@ -227,17 +227,17 @@ static bool ocl_meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv
|
||||
if ( (!doubleSupport && depth == CV_64F) )
|
||||
return false;
|
||||
|
||||
char cvt[2][40];
|
||||
char cvt[2][50];
|
||||
String opts = format("-D srcT=%s -D srcT1=%s -D dstT=%s -D dstT1=%s -D sqddepth=%d"
|
||||
" -D sqdstT=%s -D sqdstT1=%s -D convertToSDT=%s -D cn=%d%s%s"
|
||||
" -D convertToDT=%s -D WGS=%d -D WGS2_ALIGNED=%d%s%s",
|
||||
ocl::typeToStr(type), ocl::typeToStr(depth),
|
||||
ocl::typeToStr(dtype), ocl::typeToStr(ddepth), sqddepth,
|
||||
ocl::typeToStr(sqdtype), ocl::typeToStr(sqddepth),
|
||||
ocl::convertTypeStr(depth, sqddepth, cn, cvt[0]),
|
||||
ocl::convertTypeStr(depth, sqddepth, cn, cvt[0], sizeof(cvt[0])),
|
||||
cn, isContinuous ? " -D HAVE_SRC_CONT" : "",
|
||||
isMaskContinuous ? " -D HAVE_MASK_CONT" : "",
|
||||
ocl::convertTypeStr(depth, ddepth, cn, cvt[1]),
|
||||
ocl::convertTypeStr(depth, ddepth, cn, cvt[1], sizeof(cvt[1])),
|
||||
(int)wgs, wgs2_aligned, haveMask ? " -D HAVE_MASK" : "",
|
||||
doubleSupport ? " -D DOUBLE_SUPPORT" : "");
|
||||
|
||||
|
||||
@@ -1029,7 +1029,7 @@ bool ocl_minMaxIdx( InputArray _src, double* minVal, double* maxVal, int* minLoc
|
||||
needMaxLoc = true;
|
||||
}
|
||||
|
||||
char cvt[2][40];
|
||||
char cvt[2][50];
|
||||
String opts = format("-D DEPTH_%d -D srcT1=%s%s -D WGS=%d -D srcT=%s"
|
||||
" -D WGS2_ALIGNED=%d%s%s%s -D kercn=%d%s%s%s%s"
|
||||
" -D dstT1=%s -D dstT=%s -D convertToDT=%s%s%s%s%s -D wdepth=%d -D convertFromU=%s"
|
||||
@@ -1042,11 +1042,11 @@ bool ocl_minMaxIdx( InputArray _src, double* minVal, double* maxVal, int* minLoc
|
||||
needMinVal ? " -D NEED_MINVAL" : "", needMaxVal ? " -D NEED_MAXVAL" : "",
|
||||
needMinLoc ? " -D NEED_MINLOC" : "", needMaxLoc ? " -D NEED_MAXLOC" : "",
|
||||
ocl::typeToStr(ddepth), ocl::typeToStr(CV_MAKE_TYPE(ddepth, kercn)),
|
||||
ocl::convertTypeStr(depth, ddepth, kercn, cvt[0]),
|
||||
ocl::convertTypeStr(depth, ddepth, kercn, cvt[0], sizeof(cvt[0])),
|
||||
absValues ? " -D OP_ABS" : "",
|
||||
haveSrc2 ? " -D HAVE_SRC2" : "", maxVal2 ? " -D OP_CALC2" : "",
|
||||
haveSrc2 && _src2.isContinuous() ? " -D HAVE_SRC2_CONT" : "", ddepth,
|
||||
depth <= CV_32S && ddepth == CV_32S ? ocl::convertTypeStr(CV_8U, ddepth, kercn, cvt[1]) : "noconvert",
|
||||
depth <= CV_32S && ddepth == CV_32S ? ocl::convertTypeStr(CV_8U, ddepth, kercn, cvt[1], sizeof(cvt[1])) : "noconvert",
|
||||
MINMAX_STRUCT_ALIGNMENT);
|
||||
|
||||
ocl::Kernel k("minmaxloc", ocl::core::minmaxloc_oclsrc, opts);
|
||||
|
||||
@@ -753,7 +753,7 @@ double norm( InputArray _src, int normType, InputArray _mask )
|
||||
{
|
||||
int bsz = std::min(total - j, blockSize);
|
||||
hal::cvt16f32f((const float16_t*)ptrs[0], data0, bsz * cn);
|
||||
func((uchar*)data0, ptrs[1], (uchar*)&result.d, bsz, cn);
|
||||
func((uchar*)data0, ptrs[1], (uchar*)&result.f, bsz, cn);
|
||||
ptrs[0] += bsz*esz;
|
||||
if (ptrs[1])
|
||||
ptrs[1] += bsz;
|
||||
@@ -771,9 +771,9 @@ double norm( InputArray _src, int normType, InputArray _mask )
|
||||
|
||||
if( normType == NORM_INF )
|
||||
{
|
||||
if(depth == CV_64F || depth == CV_16F)
|
||||
if(depth == CV_64F)
|
||||
return result.d;
|
||||
else if (depth == CV_32F)
|
||||
else if (depth == CV_32F || depth == CV_16F)
|
||||
return result.f;
|
||||
else
|
||||
return result.i;
|
||||
@@ -995,16 +995,6 @@ static bool ipp_norm(InputArray _src1, InputArray _src2, int normType, InputArra
|
||||
type == CV_16UC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_L2_16u_C3CMR :
|
||||
type == CV_32FC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_L2_32f_C3CMR :
|
||||
0) : 0;
|
||||
if (cv::ipp::getIppTopFeatures() & (
|
||||
#if IPP_VERSION_X100 >= 201700
|
||||
ippCPUID_AVX512F |
|
||||
#endif
|
||||
ippCPUID_AVX2)
|
||||
) // IPP_DISABLE_NORM_16UC3_mask_small (#11399)
|
||||
{
|
||||
if (normType == NORM_L1 && type == CV_16UC3 && sz.width < 16)
|
||||
return false;
|
||||
}
|
||||
if( ippiNormDiff_C3CMR )
|
||||
{
|
||||
Ipp64f norm1, norm2, norm3;
|
||||
@@ -1234,7 +1224,7 @@ double norm( InputArray _src1, InputArray _src2, int normType, InputArray _mask
|
||||
int bsz = std::min(total - j, blockSize);
|
||||
hal::cvt16f32f((const float16_t*)ptrs[0], data0, bsz * cn);
|
||||
hal::cvt16f32f((const float16_t*)ptrs[1], data1, bsz * cn);
|
||||
func((uchar*)data0, (uchar*)data1, ptrs[2], (uchar*)&result.d, bsz, cn);
|
||||
func((uchar*)data0, (uchar*)data1, ptrs[2], (uchar*)&result.f, bsz, cn);
|
||||
ptrs[0] += bsz*esz;
|
||||
ptrs[1] += bsz*esz;
|
||||
if (ptrs[2])
|
||||
@@ -1253,9 +1243,9 @@ double norm( InputArray _src1, InputArray _src2, int normType, InputArray _mask
|
||||
|
||||
if( normType == NORM_INF )
|
||||
{
|
||||
if (depth == CV_64F || depth == CV_16F)
|
||||
if (depth == CV_64F)
|
||||
return result.d;
|
||||
else if (depth == CV_32F)
|
||||
else if (depth == CV_32F || depth == CV_16F)
|
||||
return result.f;
|
||||
else
|
||||
return result.u;
|
||||
@@ -1319,12 +1309,12 @@ static bool ocl_normalize( InputArray _src, InputOutputArray _dst, InputArray _m
|
||||
if ((sdepth == CV_64F || ddepth == CV_64F) && !doubleSupport)
|
||||
return false;
|
||||
|
||||
char cvt[2][40];
|
||||
char cvt[2][50];
|
||||
String opts = format("-D srcT=%s -D dstT=%s -D convertToWT=%s -D cn=%d -D rowsPerWI=%d"
|
||||
" -D convertToDT=%s -D workT=%s%s%s%s -D srcT1=%s -D dstT1=%s",
|
||||
ocl::typeToStr(stype), ocl::typeToStr(dtype),
|
||||
ocl::convertTypeStr(sdepth, wdepth, cn, cvt[0]), cn,
|
||||
rowsPerWI, ocl::convertTypeStr(wdepth, ddepth, cn, cvt[1]),
|
||||
ocl::convertTypeStr(sdepth, wdepth, cn, cvt[0], sizeof(cvt[0])), cn,
|
||||
rowsPerWI, ocl::convertTypeStr(wdepth, ddepth, cn, cvt[1], sizeof(cvt[1])),
|
||||
ocl::typeToStr(CV_MAKE_TYPE(wdepth, cn)),
|
||||
doubleSupport ? " -D DOUBLE_SUPPORT" : "",
|
||||
haveScale ? " -D HAVE_SCALE" : "",
|
||||
|
||||
@@ -1611,7 +1611,7 @@ struct Device::Impl
|
||||
if (vendorName_ == "Advanced Micro Devices, Inc." ||
|
||||
vendorName_ == "AMD")
|
||||
vendorID_ = VENDOR_AMD;
|
||||
else if (vendorName_ == "Intel(R) Corporation" || vendorName_ == "Intel" || strstr(name_.c_str(), "Iris") != 0)
|
||||
else if (vendorName_ == "Intel(R) Corporation" || vendorName_ == "Intel" || vendorName_ == "Intel Inc." || strstr(name_.c_str(), "Iris") != 0)
|
||||
vendorID_ = VENDOR_INTEL;
|
||||
else if (vendorName_ == "NVIDIA Corporation")
|
||||
vendorID_ = VENDOR_NVIDIA;
|
||||
@@ -6964,7 +6964,7 @@ const char* typeToStr(int type)
|
||||
{
|
||||
"uchar", "uchar2", "uchar3", "uchar4", 0, 0, 0, "uchar8", 0, 0, 0, 0, 0, 0, 0, "uchar16",
|
||||
"char", "char2", "char3", "char4", 0, 0, 0, "char8", 0, 0, 0, 0, 0, 0, 0, "char16",
|
||||
"ushort", "ushort2", "ushort3", "ushort4",0, 0, 0, "ushort8", 0, 0, 0, 0, 0, 0, 0, "ushort16",
|
||||
"ushort", "ushort2", "ushort3", "ushort4", 0, 0, 0, "ushort8", 0, 0, 0, 0, 0, 0, 0, "ushort16",
|
||||
"short", "short2", "short3", "short4", 0, 0, 0, "short8", 0, 0, 0, 0, 0, 0, 0, "short16",
|
||||
"int", "int2", "int3", "int4", 0, 0, 0, "int8", 0, 0, 0, 0, 0, 0, 0, "int16",
|
||||
"float", "float2", "float3", "float4", 0, 0, 0, "float8", 0, 0, 0, 0, 0, 0, 0, "float16",
|
||||
@@ -6973,7 +6973,7 @@ const char* typeToStr(int type)
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
int cn = CV_MAT_CN(type), depth = CV_MAT_DEPTH(type);
|
||||
const char* result = cn > 16 ? 0 : tab[depth*16 + cn-1];
|
||||
const char* result = cn > 16 ? nullptr : tab[depth*16 + cn-1];
|
||||
CV_Assert(result);
|
||||
return result;
|
||||
}
|
||||
@@ -6984,7 +6984,7 @@ const char* memopTypeToStr(int type)
|
||||
{
|
||||
"uchar", "uchar2", "uchar3", "uchar4", 0, 0, 0, "uchar8", 0, 0, 0, 0, 0, 0, 0, "uchar16",
|
||||
"char", "char2", "char3", "char4", 0, 0, 0, "char8", 0, 0, 0, 0, 0, 0, 0, "char16",
|
||||
"ushort", "ushort2", "ushort3", "ushort4",0, 0, 0, "ushort8", 0, 0, 0, 0, 0, 0, 0, "ushort16",
|
||||
"ushort", "ushort2", "ushort3", "ushort4", 0, 0, 0, "ushort8", 0, 0, 0, 0, 0, 0, 0, "ushort16",
|
||||
"short", "short2", "short3", "short4", 0, 0, 0, "short8", 0, 0, 0, 0, 0, 0, 0, "short16",
|
||||
"int", "int2", "int3", "int4", 0, 0, 0, "int8", 0, 0, 0, 0, 0, 0, 0, "int16",
|
||||
"int", "int2", "int3", "int4", 0, 0, 0, "int8", 0, 0, 0, 0, 0, 0, 0, "int16",
|
||||
@@ -6993,7 +6993,7 @@ const char* memopTypeToStr(int type)
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
int cn = CV_MAT_CN(type), depth = CV_MAT_DEPTH(type);
|
||||
const char* result = cn > 16 ? 0 : tab[depth*16 + cn-1];
|
||||
const char* result = cn > 16 ? nullptr : tab[depth*16 + cn-1];
|
||||
CV_Assert(result);
|
||||
return result;
|
||||
}
|
||||
@@ -7018,7 +7018,16 @@ const char* vecopTypeToStr(int type)
|
||||
return result;
|
||||
}
|
||||
|
||||
// Deprecated due to size of buf buffer being unknowable.
|
||||
const char* convertTypeStr(int sdepth, int ddepth, int cn, char* buf)
|
||||
{
|
||||
// Since the size of buf is not given, we assume 50 because that's what all callers use.
|
||||
constexpr size_t buf_max = 50;
|
||||
|
||||
return convertTypeStr(sdepth, ddepth, cn, buf, buf_max);
|
||||
}
|
||||
|
||||
const char* convertTypeStr(int sdepth, int ddepth, int cn, char* buf, size_t buf_size)
|
||||
{
|
||||
if( sdepth == ddepth )
|
||||
return "noconvert";
|
||||
@@ -7028,12 +7037,12 @@ const char* convertTypeStr(int sdepth, int ddepth, int cn, char* buf)
|
||||
(ddepth == CV_16S && sdepth <= CV_8S) ||
|
||||
(ddepth == CV_16U && sdepth == CV_8U))
|
||||
{
|
||||
sprintf(buf, "convert_%s", typestr);
|
||||
snprintf(buf, buf_size, "convert_%s", typestr);
|
||||
}
|
||||
else if( sdepth >= CV_32F )
|
||||
sprintf(buf, "convert_%s%s_rte", typestr, (ddepth < CV_32S ? "_sat" : ""));
|
||||
snprintf(buf, buf_size, "convert_%s%s_rte", typestr, (ddepth < CV_32S ? "_sat" : ""));
|
||||
else
|
||||
sprintf(buf, "convert_%s_sat", typestr);
|
||||
snprintf(buf, buf_size, "convert_%s_sat", typestr);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
@@ -85,6 +85,9 @@
|
||||
#elif defined OCL_CV_REDUCE_MIN
|
||||
#define INIT_VALUE MAX_VAL
|
||||
#define PROCESS_ELEM(acc, value) acc = min(value, acc)
|
||||
#elif defined OCL_CV_REDUCE_SUM2
|
||||
#define INIT_VALUE 0
|
||||
#define PROCESS_ELEM(acc, value) acc += value*value
|
||||
#else
|
||||
#error "No operation is specified"
|
||||
#endif
|
||||
|
||||
@@ -161,14 +161,21 @@ static int symbolToType(char c)
|
||||
return static_cast<int>(pos - symbols);
|
||||
}
|
||||
|
||||
char* encodeFormat(int elem_type, char* dt)
|
||||
char* encodeFormat(int elem_type, char* dt, size_t dt_len)
|
||||
{
|
||||
int cn = (elem_type == CV_SEQ_ELTYPE_PTR/*CV_USRTYPE1*/) ? 1 : CV_MAT_CN(elem_type);
|
||||
char symbol = (elem_type == CV_SEQ_ELTYPE_PTR/*CV_USRTYPE1*/) ? 'r' : typeSymbol(CV_MAT_DEPTH(elem_type));
|
||||
sprintf(dt, "%d%c", cn, symbol);
|
||||
snprintf(dt, dt_len, "%d%c", cn, symbol);
|
||||
return dt + (cn == 1 ? 1 : 0);
|
||||
}
|
||||
|
||||
// Deprecated due to size of dt buffer being unknowable.
|
||||
char* encodeFormat(int elem_type, char* dt)
|
||||
{
|
||||
constexpr size_t max = 20+1+1; // UINT64_MAX + one char + nul termination.
|
||||
return encodeFormat(elem_type, dt, max);
|
||||
}
|
||||
|
||||
int decodeFormat( const char* dt, int* fmt_pairs, int max_len )
|
||||
{
|
||||
int fmt_pair_count = 0;
|
||||
|
||||
@@ -91,7 +91,8 @@ char* doubleToString( char* buf, size_t bufSize, double value, bool explicitZero
|
||||
|
||||
int calcStructSize( const char* dt, int initial_size );
|
||||
int calcElemSize( const char* dt, int initial_size );
|
||||
char* encodeFormat( int elem_type, char* dt );
|
||||
CV_DEPRECATED char* encodeFormat( int elem_type, char* dt );
|
||||
char* encodeFormat( int elem_type, char* dt, size_t dt_len );
|
||||
int decodeFormat( const char* dt, int* fmt_pairs, int max_len );
|
||||
int decodeSimpleFormat( const char* dt );
|
||||
}
|
||||
|
||||
@@ -10,14 +10,14 @@ namespace cv
|
||||
|
||||
void write( FileStorage& fs, const String& name, const Mat& m )
|
||||
{
|
||||
char dt[16];
|
||||
char dt[22];
|
||||
|
||||
if( m.dims <= 2 )
|
||||
{
|
||||
fs.startWriteStruct(name, FileNode::MAP, String("opencv-matrix"));
|
||||
fs << "rows" << m.rows;
|
||||
fs << "cols" << m.cols;
|
||||
fs << "dt" << fs::encodeFormat( m.type(), dt );
|
||||
fs << "dt" << fs::encodeFormat( m.type(), dt, sizeof(dt) );
|
||||
fs << "data" << "[:";
|
||||
for( int i = 0; i < m.rows; i++ )
|
||||
fs.writeRaw(dt, m.ptr(i), m.cols*m.elemSize());
|
||||
@@ -30,7 +30,7 @@ void write( FileStorage& fs, const String& name, const Mat& m )
|
||||
fs << "sizes" << "[:";
|
||||
fs.writeRaw( "i", m.size.p, m.dims*sizeof(int) );
|
||||
fs << "]";
|
||||
fs << "dt" << fs::encodeFormat( m.type(), dt );
|
||||
fs << "dt" << fs::encodeFormat( m.type(), dt, sizeof(dt) );
|
||||
fs << "data" << "[:";
|
||||
const Mat* arrays[] = {&m, 0};
|
||||
uchar* ptrs[1] = {};
|
||||
@@ -63,7 +63,7 @@ struct SparseNodeCmp
|
||||
|
||||
void write( FileStorage& fs, const String& name, const SparseMat& m )
|
||||
{
|
||||
char dt[16];
|
||||
char dt[22];
|
||||
|
||||
fs.startWriteStruct(name, FileNode::MAP, String("opencv-sparse-matrix"));
|
||||
fs << "sizes" << "[:";
|
||||
@@ -71,7 +71,7 @@ void write( FileStorage& fs, const String& name, const SparseMat& m )
|
||||
if( dims > 0 )
|
||||
fs.writeRaw("i", m.hdr->size, dims*sizeof(int) );
|
||||
fs << "]";
|
||||
fs << "dt" << fs::encodeFormat( m.type(), dt );
|
||||
fs << "dt" << fs::encodeFormat( m.type(), dt, sizeof(dt) );
|
||||
fs << "data" << "[:";
|
||||
|
||||
size_t i = 0, n = m.nzcount();
|
||||
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( data, "#x%02x", (uchar)c );
|
||||
snprintf( data, sizeof(buf) - (data - buf), "#x%02x", (uchar)c );
|
||||
data += 4;
|
||||
}
|
||||
*data++ = ';';
|
||||
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
*data++ = 't';
|
||||
else
|
||||
{
|
||||
sprintf( data, "x%02x", c );
|
||||
snprintf( data, sizeof(buf) - (data - buf), "x%02x", c );
|
||||
data += 3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +108,22 @@ extern const uchar g_Saturate8u[];
|
||||
#define CV_MIN_8U(a,b) ((a) - CV_FAST_CAST_8U((a) - (b)))
|
||||
#define CV_MAX_8U(a,b) ((a) + CV_FAST_CAST_8U((b) - (a)))
|
||||
|
||||
template<typename T1, typename T2=T1, typename T3=T1> struct OpNop
|
||||
{
|
||||
typedef T1 type1;
|
||||
typedef T2 type2;
|
||||
typedef T3 rtype;
|
||||
T3 operator ()(const T1 a) const { return saturate_cast<T3>(a); }
|
||||
};
|
||||
|
||||
template<typename T1, typename T2=T1, typename T3=T1> struct OpSqr
|
||||
{
|
||||
typedef T1 type1;
|
||||
typedef T2 type2;
|
||||
typedef T3 rtype;
|
||||
T3 operator ()(const T1 a) const { return saturate_cast<T3>(a)*saturate_cast<T3>(a); }
|
||||
};
|
||||
|
||||
template<typename T1, typename T2=T1, typename T3=T1> struct OpAdd
|
||||
{
|
||||
typedef T1 type1;
|
||||
@@ -116,6 +132,14 @@ template<typename T1, typename T2=T1, typename T3=T1> struct OpAdd
|
||||
T3 operator ()(const T1 a, const T2 b) const { return saturate_cast<T3>(a + b); }
|
||||
};
|
||||
|
||||
template<typename T1, typename T2=T1, typename T3=T1> struct OpAddSqr
|
||||
{
|
||||
typedef T1 type1;
|
||||
typedef T2 type2;
|
||||
typedef T3 rtype;
|
||||
T3 operator ()(const T1 a, const T2 b) const { return saturate_cast<T3>(a + saturate_cast<T3>(b)*saturate_cast<T3>(b)); }
|
||||
};
|
||||
|
||||
template<typename T1, typename T2=T1, typename T3=T1> struct OpSub
|
||||
{
|
||||
typedef T1 type1;
|
||||
|
||||
@@ -62,13 +62,13 @@ bool ocl_sum( InputArray _src, Scalar & res, int sum_op, InputArray _mask,
|
||||
wgs2_aligned >>= 1;
|
||||
|
||||
static const char * const opMap[3] = { "OP_SUM", "OP_SUM_ABS", "OP_SUM_SQR" };
|
||||
char cvt[2][40];
|
||||
char cvt[2][50];
|
||||
String opts = format("-D srcT=%s -D srcT1=%s -D dstT=%s -D dstTK=%s -D dstT1=%s -D ddepth=%d -D cn=%d"
|
||||
" -D convertToDT=%s -D %s -D WGS=%d -D WGS2_ALIGNED=%d%s%s%s%s -D kercn=%d%s%s%s -D convertFromU=%s",
|
||||
ocl::typeToStr(CV_MAKE_TYPE(depth, mcn)), ocl::typeToStr(depth),
|
||||
ocl::typeToStr(dtype), ocl::typeToStr(CV_MAKE_TYPE(ddepth, mcn)),
|
||||
ocl::typeToStr(ddepth), ddepth, cn,
|
||||
ocl::convertTypeStr(depth, ddepth, mcn, cvt[0]),
|
||||
ocl::convertTypeStr(depth, ddepth, mcn, cvt[0], sizeof(cvt[0])),
|
||||
opMap[sum_op], (int)wgs, wgs2_aligned,
|
||||
doubleSupport ? " -D DOUBLE_SUPPORT" : "",
|
||||
haveMask ? " -D HAVE_MASK" : "",
|
||||
@@ -76,7 +76,7 @@ bool ocl_sum( InputArray _src, Scalar & res, int sum_op, InputArray _mask,
|
||||
haveMask && _mask.isContinuous() ? " -D HAVE_MASK_CONT" : "", kercn,
|
||||
haveSrc2 ? " -D HAVE_SRC2" : "", calc2 ? " -D OP_CALC2" : "",
|
||||
haveSrc2 && _src2.isContinuous() ? " -D HAVE_SRC2_CONT" : "",
|
||||
depth <= CV_32S && ddepth == CV_32S ? ocl::convertTypeStr(CV_8U, ddepth, convert_cn, cvt[1]) : "noconvert");
|
||||
depth <= CV_32S && ddepth == CV_32S ? ocl::convertTypeStr(CV_8U, ddepth, convert_cn, cvt[1], sizeof(cvt[1])) : "noconvert");
|
||||
|
||||
ocl::Kernel k("reduce", ocl::core::reduce_oclsrc, opts);
|
||||
if (k.empty())
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
//M*/
|
||||
|
||||
#include "precomp.hpp"
|
||||
#include <atomic>
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
|
||||
@@ -58,18 +59,6 @@
|
||||
#include <opencv2/core/utils/fp_control_utils.hpp>
|
||||
#include <opencv2/core/utils/fp_control.private.hpp>
|
||||
|
||||
#ifndef OPENCV_WITH_THREAD_SANITIZER
|
||||
#if defined(__clang__) && defined(__has_feature)
|
||||
#if __has_feature(thread_sanitizer)
|
||||
#define OPENCV_WITH_THREAD_SANITIZER 1
|
||||
#include <atomic> // assume C++11
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#ifndef OPENCV_WITH_THREAD_SANITIZER
|
||||
#define OPENCV_WITH_THREAD_SANITIZER 0
|
||||
#endif
|
||||
|
||||
namespace cv {
|
||||
|
||||
static void _initSystem()
|
||||
@@ -1487,11 +1476,7 @@ private:
|
||||
#endif
|
||||
#else // _WIN32
|
||||
pthread_key_t tlsKey;
|
||||
#if OPENCV_WITH_THREAD_SANITIZER
|
||||
std::atomic<bool> disposed;
|
||||
#else
|
||||
bool disposed;
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -1259,12 +1259,12 @@ void UMat::convertTo(OutputArray _dst, int _type, double alpha, double beta) con
|
||||
{
|
||||
int wdepth = std::max(CV_32F, sdepth), rowsPerWI = 4;
|
||||
|
||||
char cvt[2][40];
|
||||
char cvt[2][50];
|
||||
ocl::Kernel k("convertTo", ocl::core::convert_oclsrc,
|
||||
format("-D srcT=%s -D WT=%s -D dstT=%s -D convertToWT=%s -D convertToDT=%s%s%s",
|
||||
ocl::typeToStr(sdepth), ocl::typeToStr(wdepth), ocl::typeToStr(ddepth),
|
||||
ocl::convertTypeStr(sdepth, wdepth, 1, cvt[0]),
|
||||
ocl::convertTypeStr(wdepth, ddepth, 1, cvt[1]),
|
||||
ocl::convertTypeStr(sdepth, wdepth, 1, cvt[0], sizeof(cvt[0])),
|
||||
ocl::convertTypeStr(wdepth, ddepth, 1, cvt[1], sizeof(cvt[1])),
|
||||
doubleSupport ? " -D DOUBLE_SUPPORT" : "", noScale ? " -D NO_SCALE" : ""));
|
||||
if (!k.empty())
|
||||
{
|
||||
|
||||
@@ -1873,6 +1873,22 @@ OCL_TEST_P(ReduceAvg, Mat)
|
||||
}
|
||||
}
|
||||
|
||||
typedef Reduce ReduceSum2;
|
||||
|
||||
OCL_TEST_P(ReduceSum2, Mat)
|
||||
{
|
||||
for (int j = 0; j < test_loop_times; j++)
|
||||
{
|
||||
generateTestData();
|
||||
|
||||
OCL_OFF(cv::reduce(src_roi, dst_roi, dim, REDUCE_SUM2, dtype));
|
||||
OCL_ON(cv::reduce(usrc_roi, udst_roi, dim, REDUCE_SUM2, dtype));
|
||||
|
||||
double eps = ddepth <= CV_32S ? 1 : 6e-6;
|
||||
OCL_EXPECT_MATS_NEAR(dst, eps);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////// Instantiation /////////////////////////////////////////
|
||||
|
||||
OCL_INSTANTIATE_TEST_CASE_P(Arithm, Lut, Combine(::testing::Values(CV_8U, CV_8S), OCL_ALL_DEPTHS, OCL_ALL_CHANNELS, Bool(), Bool()));
|
||||
|
||||
@@ -166,7 +166,7 @@ template <typename R> struct Data
|
||||
{
|
||||
*this = r;
|
||||
}
|
||||
operator R ()
|
||||
operator R () const
|
||||
{
|
||||
return initializer<VTraits<R>::max_nlanes>().init(*this);
|
||||
}
|
||||
@@ -1736,11 +1736,39 @@ template<typename R> struct TheTest
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CV_SIMD_64F
|
||||
void do_check_cmp64(const Data<R>& dataA, const Data<R>& dataB)
|
||||
{
|
||||
R a = dataA;
|
||||
R b = dataB;
|
||||
|
||||
#if CV_SIMD_SCALABLE
|
||||
Data<R> dataEQ = v_eq(a, b);
|
||||
Data<R> dataNE = v_ne(a, b);
|
||||
#else
|
||||
Data<R> dataEQ = (a == b);
|
||||
Data<R> dataNE = (a != b);
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < VTraits<R>::vlanes(); ++i)
|
||||
{
|
||||
SCOPED_TRACE(cv::format("i=%d", i));
|
||||
if (cvtest::debugLevel > 0) cout << "i=" << i << " ( " << dataA[i] << " vs " << dataB[i] << " ): eq=" << dataEQ[i] << " ne=" << dataNE[i] << endl;
|
||||
EXPECT_NE((LaneType)dataEQ[i], (LaneType)dataNE[i]);
|
||||
if (dataA[i] == dataB[i])
|
||||
EXPECT_EQ((LaneType)-1, (LaneType)dataEQ[i]);
|
||||
else
|
||||
EXPECT_EQ((LaneType)0, (LaneType)dataEQ[i]);
|
||||
if (dataA[i] != dataB[i])
|
||||
EXPECT_EQ((LaneType)-1, (LaneType)dataNE[i]);
|
||||
else
|
||||
EXPECT_EQ((LaneType)0, (LaneType)dataNE[i]);
|
||||
}
|
||||
}
|
||||
|
||||
TheTest & test_cmp64()
|
||||
{
|
||||
Data<R> dataA, dataB;
|
||||
R a = dataA, b = dataB;
|
||||
Data<R> dataA;
|
||||
Data<R> dataB;
|
||||
|
||||
for (int i = 0; i < VTraits<R>::vlanes(); ++i)
|
||||
{
|
||||
@@ -1748,37 +1776,25 @@ template<typename R> struct TheTest
|
||||
}
|
||||
dataA[0]++;
|
||||
|
||||
a = dataA, b = dataB;
|
||||
do_check_cmp64(dataA, dataB);
|
||||
do_check_cmp64(dataB, dataA);
|
||||
|
||||
Data<R> resC = (a == b);
|
||||
Data<R> resD = (a != b);
|
||||
dataA[0] = dataB[0];
|
||||
dataA[1] += (((LaneType)1) << 32);
|
||||
do_check_cmp64(dataA, dataB);
|
||||
do_check_cmp64(dataB, dataA);
|
||||
|
||||
for (int i = 0; i < VTraits<R>::vlanes(); ++i)
|
||||
{
|
||||
SCOPED_TRACE(cv::format("i=%d", i));
|
||||
EXPECT_EQ(dataA[i] == dataB[i], resC[i] != 0);
|
||||
EXPECT_EQ(dataA[i] != dataB[i], resD[i] != 0);
|
||||
}
|
||||
dataA[0] = (LaneType)-1;
|
||||
dataB[0] = (LaneType)-1;
|
||||
dataA[1] = (LaneType)-1;
|
||||
dataB[1] = (LaneType)2;
|
||||
|
||||
for (int i = 0; i < VTraits<R>::vlanes(); ++i)
|
||||
{
|
||||
dataA[i] = dataB[i] = (LaneType)-1;
|
||||
}
|
||||
do_check_cmp64(dataA, dataB);
|
||||
do_check_cmp64(dataB, dataA);
|
||||
|
||||
a = dataA, b = dataB;
|
||||
|
||||
resC = (a == b);
|
||||
resD = (a != b);
|
||||
|
||||
for (int i = 0; i < VTraits<R>::vlanes(); ++i)
|
||||
{
|
||||
SCOPED_TRACE(cv::format("i=%d", i));
|
||||
EXPECT_EQ(dataA[i] == dataB[i], resC[i] != 0);
|
||||
EXPECT_EQ(dataA[i] != dataB[i], resD[i] != 0);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#define DUMP_ENTRY(type) printf("SIMD%d: %s\n", 8*VTraits<v_uint8>::vlanes(), CV__TRACE_FUNCTION);
|
||||
@@ -2023,9 +2039,8 @@ void test_hal_intrin_uint64()
|
||||
TheTest<v_uint64>()
|
||||
.test_loadstore()
|
||||
.test_addsub()
|
||||
#if CV_SIMD_64F
|
||||
.test_cmp64()
|
||||
#endif
|
||||
//.test_cmp() - not declared as supported
|
||||
.test_shift<1>().test_shift<8>()
|
||||
.test_logic()
|
||||
.test_reverse()
|
||||
@@ -2043,9 +2058,8 @@ void test_hal_intrin_int64()
|
||||
TheTest<v_int64>()
|
||||
.test_loadstore()
|
||||
.test_addsub()
|
||||
#if CV_SIMD_64F
|
||||
.test_cmp64()
|
||||
#endif
|
||||
//.test_cmp() - not declared as supported
|
||||
.test_shift<1>().test_shift<8>()
|
||||
.test_logic()
|
||||
.test_reverse()
|
||||
@@ -2128,7 +2142,8 @@ void test_hal_intrin_float64()
|
||||
.test_rotate<2>().test_rotate<3>()
|
||||
#endif
|
||||
;
|
||||
|
||||
#else
|
||||
std::cout << "SKIP: CV_SIMD_64F is not available" << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ protected:
|
||||
};
|
||||
|
||||
template<class Type>
|
||||
void testReduce( const Mat& src, Mat& sum, Mat& avg, Mat& max, Mat& min, int dim )
|
||||
void testReduce( const Mat& src, Mat& sum, Mat& avg, Mat& max, Mat& min, Mat& sum2, int dim )
|
||||
{
|
||||
CV_Assert( src.channels() == 1 );
|
||||
if( dim == 0 ) // row
|
||||
@@ -34,21 +34,25 @@ void testReduce( const Mat& src, Mat& sum, Mat& avg, Mat& max, Mat& min, int dim
|
||||
sum.create( 1, src.cols, CV_64FC1 );
|
||||
max.create( 1, src.cols, CV_64FC1 );
|
||||
min.create( 1, src.cols, CV_64FC1 );
|
||||
sum2.create( 1, src.cols, CV_64FC1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
sum.create( src.rows, 1, CV_64FC1 );
|
||||
max.create( src.rows, 1, CV_64FC1 );
|
||||
min.create( src.rows, 1, CV_64FC1 );
|
||||
sum2.create( src.rows, 1, CV_64FC1 );
|
||||
}
|
||||
sum.setTo(Scalar(0));
|
||||
max.setTo(Scalar(-DBL_MAX));
|
||||
min.setTo(Scalar(DBL_MAX));
|
||||
sum2.setTo(Scalar(0));
|
||||
|
||||
const Mat_<Type>& src_ = src;
|
||||
Mat_<double>& sum_ = (Mat_<double>&)sum;
|
||||
Mat_<double>& min_ = (Mat_<double>&)min;
|
||||
Mat_<double>& max_ = (Mat_<double>&)max;
|
||||
Mat_<double>& sum2_ = (Mat_<double>&)sum2;
|
||||
|
||||
if( dim == 0 )
|
||||
{
|
||||
@@ -59,6 +63,7 @@ void testReduce( const Mat& src, Mat& sum, Mat& avg, Mat& max, Mat& min, int dim
|
||||
sum_(0, ci) += src_(ri, ci);
|
||||
max_(0, ci) = std::max( max_(0, ci), (double)src_(ri, ci) );
|
||||
min_(0, ci) = std::min( min_(0, ci), (double)src_(ri, ci) );
|
||||
sum2_(0, ci) += ((double)src_(ri, ci))*((double)src_(ri, ci));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,6 +76,7 @@ void testReduce( const Mat& src, Mat& sum, Mat& avg, Mat& max, Mat& min, int dim
|
||||
sum_(ri, 0) += src_(ri, ci);
|
||||
max_(ri, 0) = std::max( max_(ri, 0), (double)src_(ri, ci) );
|
||||
min_(ri, 0) = std::min( min_(ri, 0), (double)src_(ri, ci) );
|
||||
sum2_(ri, 0) += ((double)src_(ri, ci))*((double)src_(ri, ci));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,7 +99,7 @@ int Core_ReduceTest::checkOp( const Mat& src, int dstType, int opType, const Mat
|
||||
{
|
||||
int srcType = src.type();
|
||||
bool support = false;
|
||||
if( opType == REDUCE_SUM || opType == REDUCE_AVG )
|
||||
if( opType == REDUCE_SUM || opType == REDUCE_AVG || opType == REDUCE_SUM2 )
|
||||
{
|
||||
if( srcType == CV_8U && (dstType == CV_32S || dstType == CV_32F || dstType == CV_64F) )
|
||||
support = true;
|
||||
@@ -128,7 +134,7 @@ int Core_ReduceTest::checkOp( const Mat& src, int dstType, int opType, const Mat
|
||||
return cvtest::TS::OK;
|
||||
|
||||
double eps = 0.0;
|
||||
if ( opType == REDUCE_SUM || opType == REDUCE_AVG )
|
||||
if ( opType == REDUCE_SUM || opType == REDUCE_AVG || opType == REDUCE_SUM2 )
|
||||
{
|
||||
if ( dstType == CV_32F )
|
||||
eps = 1.e-5;
|
||||
@@ -152,10 +158,13 @@ int Core_ReduceTest::checkOp( const Mat& src, int dstType, int opType, const Mat
|
||||
if( check )
|
||||
{
|
||||
char msg[100];
|
||||
const char* opTypeStr = opType == REDUCE_SUM ? "REDUCE_SUM" :
|
||||
opType == REDUCE_AVG ? "REDUCE_AVG" :
|
||||
opType == REDUCE_MAX ? "REDUCE_MAX" :
|
||||
opType == REDUCE_MIN ? "REDUCE_MIN" : "unknown operation type";
|
||||
const char* opTypeStr =
|
||||
opType == REDUCE_SUM ? "REDUCE_SUM" :
|
||||
opType == REDUCE_AVG ? "REDUCE_AVG" :
|
||||
opType == REDUCE_MAX ? "REDUCE_MAX" :
|
||||
opType == REDUCE_MIN ? "REDUCE_MIN" :
|
||||
opType == REDUCE_SUM2 ? "REDUCE_SUM2" :
|
||||
"unknown operation type";
|
||||
string srcTypeStr, dstTypeStr;
|
||||
getMatTypeStr( src.type(), srcTypeStr );
|
||||
getMatTypeStr( dstType, dstTypeStr );
|
||||
@@ -172,25 +181,25 @@ int Core_ReduceTest::checkOp( const Mat& src, int dstType, int opType, const Mat
|
||||
int Core_ReduceTest::checkCase( int srcType, int dstType, int dim, Size sz )
|
||||
{
|
||||
int code = cvtest::TS::OK, tempCode;
|
||||
Mat src, sum, avg, max, min;
|
||||
Mat src, sum, avg, max, min, sum2;
|
||||
|
||||
src.create( sz, srcType );
|
||||
randu( src, Scalar(0), Scalar(100) );
|
||||
|
||||
if( srcType == CV_8UC1 )
|
||||
testReduce<uchar>( src, sum, avg, max, min, dim );
|
||||
testReduce<uchar>( src, sum, avg, max, min, sum2, dim );
|
||||
else if( srcType == CV_8SC1 )
|
||||
testReduce<char>( src, sum, avg, max, min, dim );
|
||||
testReduce<char>( src, sum, avg, max, min, sum2, dim );
|
||||
else if( srcType == CV_16UC1 )
|
||||
testReduce<unsigned short int>( src, sum, avg, max, min, dim );
|
||||
testReduce<unsigned short int>( src, sum, avg, max, min, sum2, dim );
|
||||
else if( srcType == CV_16SC1 )
|
||||
testReduce<short int>( src, sum, avg, max, min, dim );
|
||||
testReduce<short int>( src, sum, avg, max, min, sum2, dim );
|
||||
else if( srcType == CV_32SC1 )
|
||||
testReduce<int>( src, sum, avg, max, min, dim );
|
||||
testReduce<int>( src, sum, avg, max, min, sum2, dim );
|
||||
else if( srcType == CV_32FC1 )
|
||||
testReduce<float>( src, sum, avg, max, min, dim );
|
||||
testReduce<float>( src, sum, avg, max, min, sum2, dim );
|
||||
else if( srcType == CV_64FC1 )
|
||||
testReduce<double>( src, sum, avg, max, min, dim );
|
||||
testReduce<double>( src, sum, avg, max, min, sum2, dim );
|
||||
else
|
||||
CV_Assert( 0 );
|
||||
|
||||
@@ -210,6 +219,10 @@ int Core_ReduceTest::checkCase( int srcType, int dstType, int dim, Size sz )
|
||||
tempCode = checkOp( src, dstType, REDUCE_MIN, min, dim );
|
||||
code = tempCode != cvtest::TS::OK ? tempCode : code;
|
||||
|
||||
// 5. sum2
|
||||
tempCode = checkOp( src, dstType, REDUCE_SUM2, sum2, dim );
|
||||
code = tempCode != cvtest::TS::OK ? tempCode : code;
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -497,7 +510,7 @@ static string idx2string(const int* idx, int dims)
|
||||
char* ptr = buf;
|
||||
for( int k = 0; k < dims; k++ )
|
||||
{
|
||||
sprintf(ptr, "%4d ", idx[k]);
|
||||
snprintf(ptr, sizeof(buf) - (ptr - buf), "%4d ", idx[k]);
|
||||
ptr += strlen(ptr);
|
||||
}
|
||||
ptr[-1] = '\0';
|
||||
@@ -1563,6 +1576,7 @@ TEST(Reduce, regression_should_fail_bug_4594)
|
||||
EXPECT_THROW(cv::reduce(src, dst, 0, REDUCE_MAX, CV_32S), cv::Exception);
|
||||
EXPECT_NO_THROW(cv::reduce(src, dst, 0, REDUCE_SUM, CV_32S));
|
||||
EXPECT_NO_THROW(cv::reduce(src, dst, 0, REDUCE_AVG, CV_32S));
|
||||
EXPECT_NO_THROW(cv::reduce(src, dst, 0, REDUCE_SUM2, CV_32S));
|
||||
}
|
||||
|
||||
TEST(Mat, push_back_vector)
|
||||
|
||||
@@ -3023,7 +3023,7 @@ TEST(CovariationMatrixVectorOfMatWithMean, accuracy)
|
||||
cv::randu(src,cv::Scalar(-128), cv::Scalar(128));
|
||||
cv::Mat goldMean;
|
||||
|
||||
cv::reduce(src,goldMean,0 ,REDUCE_AVG, CV_32F);
|
||||
cv::reduce(src, goldMean, 0, REDUCE_AVG, CV_32F);
|
||||
|
||||
cv::calcCovarMatrix(src,gold,goldMean,singleMatFlags,CV_32F);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user