The quadratic form x'*A*x is actually calculated as a sum of
j runs from
Are you going to use CSR format for matrix A? If so, you could split the quadratic form into two equations. You could use mkl_?csrsymv to calculate y:=A*x first and then use ?dot to calculate sum of dot multiplication of two vectors res=x' * y. Hope it would be useful to you.
I am afraid there might no real quadratic form function for matrix with sparse storage format. The good way is to separate calculation. Thanks.