I am running MATLAB on Linux, and I have a MATLAB function, simplefn, shown below:
function [outputArg1] = simplefn(inputArg1,inputArg2)outputArg1 = inputArg1 * inputArg2;end
When I generate code for this function, I see code as follows in simplefn.c:
void simplefn(const double inputArg1[1000000], const double inputArg2[1000000], double outputArg1[1000000]){ double d; int i; int i1; int i2; for (i = 0; i < 1000; i++) { for (i1 = 0; i1 < 1000; i1++) { d = 0.0; for (i2 = 0; i2 < 1000; i2++) { d += inputArg1[i + 1000 * i2] * inputArg2[i2 + 1000 * i1]; } outputArg1[i + 1000 * i1] = d; } }}
However, I want the generated code to use OpenBLAS routines. How do I accomplish this?
Best Answer