Hi,
I come just install new version of Hipacc (today) and I can't compile my old code with this new version. My old installation of Hipacc dated last May and my codes compiled without problem with the old version.
Here is the I try to compile:
Mat img = cv::imread(argv[1], CV_LOAD_IMAGE_GRAYSCALE);
int width = img.cols;
int height = img.rows;
Image<uint8_t> input_img(width, height);
input_img = img_aligned.data;
Image<uint8_t> gauss_img(width, height);
IterationSpace<uint8_t> IsGauss_img(gauss_img);
Image<float> gradient(width, height);
IterationSpace<float> IsGradient(gradient);
//and so on ....
BoundaryCondition<uint8_t> boud_input(input_img, gauss, Boundary::REPEAT);
Accessor<uint8_t> in_accessor(boud_input);
GaussianFilter blur(IsGauss_img, in_accessor, dom, gauss);
blur.execute();
//and so on ....
I used the Makefile.cmake file in Hipacc/tests/ directory. With make cuda
I get following errors:
main.cu(395): error: identifier "gradient" is undefined
main.cu(396): error: identifier "gauss_img" is undefined
main.cu(397): error: identifier "input_img" is undefined
It seems that all arrays declared with Image<type>data(...)
are undefined.
And with make cpu
:
./src/main.cpp:325:28: error: Constant expression for width argument of Image input_img required (C/C++ only).
Image<uint8_t> input_img(width, height);
^
./src/main.cpp:325:35: error: Constant expression for height argument of Image input_img required (C/C++ only).
Image<uint8_t> input_img(width, height);
^
I replaced width
and height
by constants but I get sames errors messages.
How can I solve this problem. I have formatted my PC and I no longer have my old Hipacc installation.
Thanks.