Helper¶
Definitions of helper functions.
- Author
Venkata Mukund Kashyap Yedunuthala
- Date
23 January 2024
Functions
-
void printinfo(unsigned int &numRows, unsigned int &numCols, unsigned short int &maxVal)¶
Prints out introductory info to terminal.
- Parameters:
numRows – Number of rows present in input image file.
numCols – Number of columns present in input image file.
maxVal – Maximum value as seen in input image file.
-
void set_kernels(int **&edgeDetection, int **&identity, int **&sharpen, double **&gaussBlur)¶
Initiates convolution kernels.
- Parameters:
edgeDetection – Edge detection kernel.
identity – Identity kernel.
sharpen – Sharpening kernel.
gaussBlur – Gaussian blur kernel.
-
void set_input(int *&array, unsigned long int &N, std::stringstream &strStream)¶
Initiates a given array with values present in stringstream.
- Parameters:
array – Array to which values are written to.
N – Size of the array.
strStream – Input stringstream.
-
void set_array(int *&array, unsigned long int &size, int *&inputArr)¶
Initiates a given array with values present in another array.
- Parameters:
array – Array to which values are written to.
size – Size of the array.
inputArr – Input array.
-
void set_array(int *&array, unsigned long int &size, int &value)¶
Initiates a given array with a constant value.
- Parameters:
array – Array to which values are written to.
size – Size of the array.
value – Constant value.
-
void print_time_info(double &time)¶
Prints total time taken to terminal.
- Parameters:
time – Calculated wall time taken.
-
void print_max_value(const int *const &buffer, int bufferSize)¶
Prints maximum value present in a 1-d array as used in this project.
- Parameters:
buffer – The array
bufferSize – The size of the array