61 std::cout <<
"Usage: ./build/neon_convolution [input_image.ppm]\n\n";
62 std::cout <<
"No input_image provided, creating a dummy 640x480 image\n";
74 tmp.allocator()->init(*src.info());
75 dst.allocator()->init(*src.info());
86 src.allocator()->allocate();
87 tmp.allocator()->allocate();
88 dst.allocator()->allocate();
103 const std::string output_filename = std::string(argv[1]) +
"_out.ppm";
114 int main(
int argc,
const char **argv)
bool is_open()
Return true if a PPM file is currently open.
void main_neon_convolution(int argc, const char **argv)
void fill_image(T &image)
Fill an image with the content of the currently open PPM file.
Basic function to execute convolution of size 5x5.
Basic function to execute convolution of size 3x3.
void run() override
Run the kernels contained in the function.
const int16_t gaussian5x5[]
Gaussian 5x5 matrix.
Structure to hold Image information.
void open(const std::string &ppm_filename)
Open a PPM file and reads its metadata (Width, height)
int run_example(int argc, const char **argv, example &func)
Run an example and handle the potential exceptions it throws.
Class to load the content of a PPM file into an Image.
void init_image(T &image, Format format)
Initialise an image's metadata with the dimensions of the PPM file currently open.
void configure(ITensor *input, ITensor *output, const int16_t *conv, uint32_t scale, BorderMode border_mode, uint8_t constant_border_value=0)
Initialize the function's source, destination, conv and border_mode.
void configure(ITensor *input, ITensor *output, const int16_t *conv, uint32_t scale, BorderMode border_mode, uint8_t constant_border_value=0)
Initialize the function's source, destination, conv and border_mode.
Borders are left undefined.
void run() overridefinal
Run the kernels contained in the function.
void save_to_ppm(T &tensor, const std::string &ppm_filename)
Template helper function to save a tensor image to a PPM file.
Store the tensor's metadata.
const int16_t gaussian3x3[]
Gaussian 3x3 matrix.
int main(int argc, const char **argv)
Main program for convolution test.