None.
Open in the MATLAB editor: f16ea_example
function f16ea_example fprintf('f16ea example results\n\n'); % First dot product; equivalent of % r = 0*r + 0.3*x*y(n:-1:1)' n = int64(5); incx = int64(1); incy = int64(-1); x = [1 2 3 4 5]; y = [1 2 3 -4 -5]; alpha = 0.3; beta = 0; conj = int64(0); r = 0; [r] = f16ea(... conj, n, alpha, x, incx, beta, y, incy, r); fprintf(' first dot product = %7.2f\n',r); % Second ddot to be added to first; equivalent of % r = r -7*x(2*(n-1)+1:-2:1)*y(n:-1:1)' n = int64(4); incx = int64(-2); incy = int64(-1); alpha = -7.0; beta = 1; x = [0.1 9.9 0.2 9.9 0.3 9.9 0.4]; y = [0.1 0.2 0.3 0.4]; [r] = f16ea(... conj, n, alpha, x, incx, beta, y, incy, r); fprintf('Accumulated dot product = %7.2f\n',r);
f16ea example results first dot product = 2.70 Accumulated dot product = 0.60