printf_vector
//
#define printf_u8x16_t(_var0) do{ char _var_name[] = #_var0; uint8x16_t _var = (uint8x16_t)_var0; printf("%-10s %-32s = %02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X | %3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d\n", "u8x16_t", _var_name, _var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7], _var[8+0], _var[8+1], _var[8+2], _var[8+3], _var[8+4], _var[8+5], _var[8+6], _var[8+7], _var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7], _var[8+0], _var[8+1], _var[8+2], _var[8+3], _var[8+4], _var[8+5], _var[8+6], _var[8+7]); }while(0)
#define printf_u16x8_t(_var0) do{ char _var_name[] = #_var0; uint16x8_t _var = (uint16x8_t)_var0; printf("%-10s %-32s = %04X. %04X. %04X. %04X. %04X. %04X. %04X. %04X | %7d.%7d.%7d.%7d.%7d.%7d.%7d.%7d\n", "u16x8_t", _var_name, _var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7], _var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7]); }while(0)
#define printf_u32x4_t(_var0) do{ char _var_name[] = #_var0; uint32x4_t _var = (uint32x4_t)_var0; printf("%-10s %-32s = %08X. %08X. %08X. %08X | %15d.%15d.%15d.%15d \n", "u32x4_t", _var_name, _var[0], _var[1], _var[2], _var[3], _var[0], _var[1], _var[2], _var[3]); }while(0)
#define set_u8x16_t_case1(_var0) do{ *(uint8x16_t*)&(_var0) = (uint8x16_t){1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; }while(0)
#define set_u16x8_t_case1(_var0) do{ *(uint16x8_t*)&(_var0) = (uint16x8_t){1,2,3,4,5,6,7,8}; }while(0)
//
printf_opencv_point
//
#define printf_cvPoint2f(_Var) printf("[opencv info] cv::Point2f %-20s : %f, %f\n", #_Var, _Var.x, _Var.y);
#define printf_cvPoint2f_vector(_Var) printf("[opencv info] std::vector<cv::Point2f> %-20s : size=%d\n", #_Var, _Var.size()); \
for(int Index = 0; Index < _Var.size(); Index++) \
{ \
printf("[opencv info] std::vector<cv::Point2f> %-20s : \t%5d, x=%f, y=%f\n", #_Var, Index, _Var[Index].x, _Var[Index].y); \
} \
//
printf_opencv_cvmat
//
#define printf_cvmat_header(mImg) printf("[cv::Mat info] %-20s : dims=%d, rows=%d, cols=%d, channels()=%d, depth()=%d, step=%4d, elemSize=%d, elemSize1=%d, data=%016lX, datastart=%012lX, dataend=%012lX, datalimit=%012lX\n", #mImg, mImg.dims, mImg.cols, mImg.rows, mImg.channels(), mImg.depth(), (int)mImg.step, (int)mImg.elemSize(), (int)mImg.elemSize1(), (unsigned long long int)mImg.data, (unsigned long long int)mImg.datastart, (unsigned long long int)mImg.dataend, (unsigned long long int)mImg.datalimit);
#define printf_cvmat_rect(mImg, _x0, _y0, _x1, _y1) \
do{ \
int x0 = _x0;int x1 = _x1; int y0 = _y0;int y1 = _y1; \
printf_cvmat_header(mImg); \
printf(" | "); \
for(int IndexX = x0; IndexX < x1; IndexX++) \
{ \
printf("%02d|", IndexX/100); \
} \
printf("\n"); \
printf(" | "); \
for(int IndexX = x0; IndexX < x1; IndexX++) \
{ \
printf("%02d|", IndexX%100); \
} \
printf("\n"); \
printf("----|-"); \
for(int IndexX = x0; IndexX < x1; IndexX++) \
{ \
printf("---"); \
} \
printf("\n"); \
\
for(int IndexY = y0; IndexY < y1; IndexY++) \
{ \
printf("%04d| ", IndexY); \
const uchar* pImgLine = mImg.ptr<uchar>(IndexY); \
for(int IndexX = x0; IndexX < x1; IndexX++) \
{ \
printf("%02X.", pImgLine[IndexX]); \
} \
printf("\n"); \
} \
}while(0)
#define printf_cvmat_data(mImg) printf_cvmat_rect(mImg, 0, 0, mImg.cols, mImg.rows)
#define printf_cvPoint2f(_Var) printf("[opencv info] cv::Point2f %-20s : %f, %f\n", #_Var, _Var.x, _Var.y);
//
历史不用了
code00
#
#if 1
#define vaddl_low_u8(__a, __b) vaddl_u8(vget_low_u8(__a), vget_low_u8(__b))
#define vmull_low_u8(__a, __b) vmull_u8(vget_low_u8(__a), vget_low_u8(__b))
#define vmlal_low_u8(__a, __b, __c) vmlal_u8(__a, vget_low_u8(__b), vget_low_u8(__c))
#define vaddl_low_u16(__a, __b) vaddl_u16(vget_low_u16(__a), vget_low_u16(__b))
#define vmull_low_u16(__a, __b) vmull_u16(vget_low_u16(__a), vget_low_u16(__b))
#define vmull_low_n_u16(__a, __b) vmull_n_u16(vget_low_u16(__a), __b)
#define vmlal_low_u16(__a, __b, __c) vmlal_u16(__a, vget_low_u16(__b), vget_low_u16(__c))
#define vaddl_low_u32(__a, __b) vaddl_u32(vget_low_u32(__a), vget_low_u32(__b))
#define vmull_low_u32(__a, __b) vmull_u32(vget_low_u32(__a), vget_low_u32(__b))
#define vmlal_low_u32(__a, __b, __c) vmlal_u32(__a, vget_low_u32(__b), vget_low_u32(__c))
#endif//
#ifdef NO_DEFINE
#define vaddl_high_u8(__a, __b) vaddl_high_u8(__a, __b)
#define vmull_high_u8(__a, __b) vmull_high_u8(__a, __b)
#define vmlal_high_u8(__a, __b, __c) vmlal_high_u8(__a, __b, __c)
#define vaddl_high_u16(__a, __b) vaddl_high_u16(__a, __b)
#define vmull_high_u16(__a, __b) vmull_high_u16(__a, __b)
#define vmull_high_n_u16(__a, __b) vmull_high_n_u16(__a, __b)
#define vmlal_high_u16(__a, __b, __c) vmlal_high_u16(__a, __b, __c)
#define vaddl_high_u32(__a, __b) vaddl_high_u32(__a, __b)
#define vmull_high_u32(__a, __b) vmull_high_u32(__a, __b)
#define vmlal_high_u32(__a, __b, __c) vmlal_high_u32(__a, __b, __c)
#endif//NO_DEFINE
#define printf_u8x16_t(_var) \
do{ \
printf("%-10s %-32s = %02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X\n", "u8x16_t", #_var, \
_var[0+0], _var[0+1], _var[0+2], _var[0+3], _var[0+4], _var[0+5], _var[0+6], _var[0+7], \
_var[8+0], _var[8+1], _var[8+2], _var[8+3], _var[8+4], _var[8+5], _var[8+6], _var[8+7] \
); \
}while(0)
#define printf_u16x8_t(_var) \
do{ printf("%-10s %-32s = %04X.%04X.%04X.%04X.%04X.%04X.%04X.%04X\n", "u16x8_t", #_var, \
_var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7] \
); \
}while(0)
#define printf_u32x4_t(_var) \
do{ printf("%-10s %-32s = %08X.%08X.%08X.%08X\n", "u32x4_t", #_var, \
_var[0], _var[1], _var[2], _var[3] \
); \
}while(0)
#define printf_u8x16_t(_var) \
do{ \
printf("%-10s %-32s = %3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d\n", "u8x16_t", #_var, \
_var[0+0], _var[0+1], _var[0+2], _var[0+3], _var[0+4], _var[0+5], _var[0+6], _var[0+7], \
_var[8+0], _var[8+1], _var[8+2], _var[8+3], _var[8+4], _var[8+5], _var[8+6], _var[8+7] \
); \
}while(0)
#define printf_u16x8_t(_var) \
do{ printf("%-10s %-32s = %7d.%7d.%7d.%7d.%7d.%7d.%7d.%7d\n", "u16x8_t", #_var, \
_var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7] \
); \
}while(0)
#define printf_u32x4_t(_var) \
do{ printf("%-10s %-32s = %15d.%15d.%15d.%15d\n", "u32x4_t", #_var, \
_var[0], _var[1], _var[2], _var[3] \
); \
}while(0)
#
#
#define printf_u8x16_t(_var) do{ printf("%-10s %-32s = %02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X\n", "u8x16_t", #_var, _var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7], _var[8+0], _var[8+1], _var[8+2], _var[8+3], _var[8+4], _var[8+5], _var[8+6], _var[8+7]); }while(0)
#define printf_u16x8_t(_var) do{ printf("%-10s %-32s = %04X.%04X.%04X.%04X.%04X.%04X.%04X.%04X\n", "u16x8_t", #_var, _var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7]); }while(0)
#
printf_u8x16_t(data_uint.val[0]);
printf_u8x16_t(data_uint.val[1]);
data_uint.val[1][15] = 0;
uint8x16_t out1 = __builtin_shuffle(data_uint.val[0], data_uint.val[1], shuffle_0);
printf_u8x16_t(shuffle_0);
printf_u8x16_t(out1);
#
code01
//
#define printf_u8x16_t(_var0) do{ char _var_name[] = #_var0; uint8x16_t _var = (uint8x16_t)_var0; printf("%-10s %-32s = %02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X | %3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d\n", "u8x16_t", _var_name, _var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7], _var[8+0], _var[8+1], _var[8+2], _var[8+3], _var[8+4], _var[8+5], _var[8+6], _var[8+7], _var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7], _var[8+0], _var[8+1], _var[8+2], _var[8+3], _var[8+4], _var[8+5], _var[8+6], _var[8+7]); }while(0)
#define printf_u16x8_t(_var0) do{ char _var_name[] = #_var0; uint16x8_t _var = (uint16x8_t)_var0; printf("%-10s %-32s = %04X. %04X. %04X. %04X. %04X. %04X. %04X. %04X | %7d.%7d.%7d.%7d.%7d.%7d.%7d.%7d\n", "u16x8_t", _var_name, _var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7], _var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7]); }while(0)
#define printf_u32x4_t(_var0) do{ char _var_name[] = #_var0; uint32x4_t _var = (uint32x4_t)_var0; printf("%-10s %-32s = %08X. %08X. %08X. %08X | %15d.%15d.%15d.%15d \n", "u32x4_t", _var_name, _var[0], _var[1], _var[2], _var[3], _var[0], _var[1], _var[2], _var[3]); }while(0)
//
#
#if 1
#define vaddl_low_u8(__a, __b) vaddl_u8(vget_low_u8(__a), vget_low_u8(__b))
#define vmull_low_u8(__a, __b) vmull_u8(vget_low_u8(__a), vget_low_u8(__b))
#define vmlal_low_u8(__a, __b, __c) vmlal_u8(__a, vget_low_u8(__b), vget_low_u8(__c))
#define vaddl_low_u16(__a, __b) vaddl_u16(vget_low_u16(__a), vget_low_u16(__b))
#define vmull_low_u16(__a, __b) vmull_u16(vget_low_u16(__a), vget_low_u16(__b))
#define vmull_low_n_u16(__a, __b) vmull_n_u16(vget_low_u16(__a), __b)
#define vmlal_low_u16(__a, __b, __c) vmlal_u16(__a, vget_low_u16(__b), vget_low_u16(__c))
#define vaddl_low_u32(__a, __b) vaddl_u32(vget_low_u32(__a), vget_low_u32(__b))
#define vmull_low_u32(__a, __b) vmull_u32(vget_low_u32(__a), vget_low_u32(__b))
#define vmlal_low_u32(__a, __b, __c) vmlal_u32(__a, vget_low_u32(__b), vget_low_u32(__c))
#endif//
#ifdef NO_DEFINE
#define vaddl_high_u8(__a, __b) vaddl_high_u8(__a, __b)
#define vmull_high_u8(__a, __b) vmull_high_u8(__a, __b)
#define vmlal_high_u8(__a, __b, __c) vmlal_high_u8(__a, __b, __c)
#define vaddl_high_u16(__a, __b) vaddl_high_u16(__a, __b)
#define vmull_high_u16(__a, __b) vmull_high_u16(__a, __b)
#define vmull_high_n_u16(__a, __b) vmull_high_n_u16(__a, __b)
#define vmlal_high_u16(__a, __b, __c) vmlal_high_u16(__a, __b, __c)
#define vaddl_high_u32(__a, __b) vaddl_high_u32(__a, __b)
#define vmull_high_u32(__a, __b) vmull_high_u32(__a, __b)
#define vmlal_high_u32(__a, __b, __c) vmlal_high_u32(__a, __b, __c)
#endif//NO_DEFINE
#define printf_u8x16_t(_var) \
do{ \
printf("%-10s %-32s = %02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X\n", "u8x16_t", #_var, \
_var[0+0], _var[0+1], _var[0+2], _var[0+3], _var[0+4], _var[0+5], _var[0+6], _var[0+7], \
_var[8+0], _var[8+1], _var[8+2], _var[8+3], _var[8+4], _var[8+5], _var[8+6], _var[8+7] \
); \
}while(0)
#define printf_u16x8_t(_var) \
do{ printf("%-10s %-32s = %04X.%04X.%04X.%04X.%04X.%04X.%04X.%04X\n", "u16x8_t", #_var, \
_var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7] \
); \
}while(0)
#define printf_u32x4_t(_var) \
do{ printf("%-10s %-32s = %08X.%08X.%08X.%08X\n", "u32x4_t", #_var, \
_var[0], _var[1], _var[2], _var[3] \
); \
}while(0)
#define printf_u8x16_t(_var) \
do{ \
printf("%-10s %-32s = %3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d.%3d\n", "u8x16_t", #_var, \
_var[0+0], _var[0+1], _var[0+2], _var[0+3], _var[0+4], _var[0+5], _var[0+6], _var[0+7], \
_var[8+0], _var[8+1], _var[8+2], _var[8+3], _var[8+4], _var[8+5], _var[8+6], _var[8+7] \
); \
}while(0)
#define printf_u16x8_t(_var) \
do{ printf("%-10s %-32s = %7d.%7d.%7d.%7d.%7d.%7d.%7d.%7d\n", "u16x8_t", #_var, \
_var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7] \
); \
}while(0)
#define printf_u32x4_t(_var) \
do{ printf("%-10s %-32s = %15d.%15d.%15d.%15d\n", "u32x4_t", #_var, \
_var[0], _var[1], _var[2], _var[3] \
); \
}while(0)
#
#
#define printf_u8x16_t(_var) do{ printf("%-10s %-32s = %02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X\n", "u8x16_t", #_var, _var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7], _var[8+0], _var[8+1], _var[8+2], _var[8+3], _var[8+4], _var[8+5], _var[8+6], _var[8+7]); }while(0)
#define printf_u16x8_t(_var) do{ printf("%-10s %-32s = %04X.%04X.%04X.%04X.%04X.%04X.%04X.%04X\n", "u16x8_t", #_var, _var[0], _var[1], _var[2], _var[3], _var[4], _var[5], _var[6], _var[7]); }while(0)
#
printf_u8x16_t(data_uint.val[0]);
printf_u8x16_t(data_uint.val[1]);
data_uint.val[1][15] = 0;
uint8x16_t out1 = __builtin_shuffle(data_uint.val[0], data_uint.val[1], shuffle_0);
printf_u8x16_t(shuffle_0);
printf_u8x16_t(out1);
#
code.end