write a C++ Program for matrix operations which include:
1. constructor in the form-- matrix::matrix(int numRows, intnumColumns)
2. Implement a setter method of the form: -- voidmatrix::setElement(int row, int col)
3 Implement a getter method of the form: -- floatmatrix::getElement(int row, int col)
4. Make a threaded version of the matrix/matrix additionmethod.
5. Make a threaded version of the matrix/scalar multiplicationmethod.
6. Matrix/matrix addition methods of the form: -- matrixmatrix::matrixAdd(matrix inMatrix) // non-threaded version
matrix matrix::matrixAdd_threaded(matrix inMatrix) // threadedversion
7. Matrix/scalar multiplication methods of the form: -- matrixmatrix::scalarMult(float scalar) // non-threaded version
matrix matrix::scalarMult_threaded(float scalar) // threadedversion
8. The vector reduce operation method should be of the form:
float matrix::reduceVec()
The reduce operation must use parallelization with the followingalgorithm. Use eight threads to compute this. Begin by splittingthe vector (a 1xM matrix with one row and M columns) into 8 parts.Compute the sum of those parts and store them. Then, launch eightthreads to sum the sums. Do this until you have a single numberremaining.