Assuming that you already know the parameters of your model, you can do this by multiplying matrix vectors. Linear regression is an internal product of the matrix of X samples and a vector theta of model parameters.
int rows = 4;
int cols = 2;
double theta[] = {5.0, 2.0};
double x[] = {1.0, 10.0,
1.0, 20.0,
1.0, 30.0,
1.0, 40.0};
double y[rows];
vDSP_mmulD(x, 1, theta, 1, y, 1, rows, 1, cols);
NSLog(@"[%f, %f, %f, %f]", y[0], y[1], y[2], y[3]);
[25.000000, 45.000000, 65.000000, 85.000000]