This commit is contained in:
luoliang
2022-10-10 20:52:08 +08:00
parent e47e5f027b
commit 43c8362af7
13 changed files with 134 additions and 138 deletions

View File

@@ -3,7 +3,7 @@
#include "test_precomp.hpp"
typedef enum TestDatatype { INT = 1, FLOAT } TestDatatype;
using TestDatatype = enum TestDatatype { INT = 1, FLOAT };
class CV_EXPORTS Common_Test {
public:

View File

@@ -1,18 +1,19 @@
#include <iostream>
#include "acl/acl.h"
#include "opencv2/acl/acl.hpp"
#include "opencv2/core.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/acl/acl.hpp"
#include "acl/acl.h"
#include <iostream>
using namespace cv;
using namespace cv::acl;
using namespace std;
/**
* @brief A simple example of the split and merge functions,Using a different Stream
*
* @brief A simple example of the split and merge functions, Using a different
* Stream
*/
int test_func1(aclCxt *acl_context_0) {
Mat src = imread("../cat1.jpg");
@@ -53,10 +54,8 @@ int test_func1(aclCxt *acl_context_0) {
imshow("imgdest", imgdest);
}
/**
* @brief A demo of use a stream to synchronize multiple functions
*
*/
int test_func2(aclCxt *acl_context_0) {
Mat src = imread("../cat1.jpg");
@@ -71,7 +70,6 @@ int test_func2(aclCxt *acl_context_0) {
return -1;
}
// 待split操作数据上传数据到aclMat对象中
aclMat acl_src(src, acl_context_0);
aclMat acl_dest1;
@@ -110,8 +108,7 @@ int test_func2(aclCxt *acl_context_0) {
imshow("flip_dest", flip_dest);
}
int main()
{
int main() {
// 初始化
aclCxt *acl_context_0 = set_device("../acl.json", 1, 2);
@@ -123,4 +120,3 @@ int main()
return 0;
}