The R Project SVN R-packages

Rev

Rev 1258 | Rev 1856 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1258 Rev 1259
Line 128... Line 128...
128
	*vx = REAL(GET_SLOT(val, Matrix_xSym));
128
	*vx = REAL(GET_SLOT(val, Matrix_xSym));
129
 
129
 
130
    if (yDim[0] != xDim[1])
130
    if (yDim[0] != xDim[1])
131
	error(_("Dimensions of a (%d,%d) and b (%d,%d) do not conform"),
131
	error(_("Dimensions of a (%d,%d) and b (%d,%d) do not conform"),
132
	      xDim[0], xDim[1], yDim[0], yDim[1]);
132
	      xDim[0], xDim[1], yDim[0], yDim[1]);
133
    for (j = 0; j < yDim[1]; j++) /* A %*% x  via BLAS 2 DTPMV(.) */
133
    for (j = 0; j < yDim[1]; j++) /* X %*% y[,j]  via BLAS 2 DTPMV(.) */
134
	F77_CALL(dtpmv)(uplo, "N", diag, yDim, xx,
134
	F77_CALL(dtpmv)(uplo, "N", diag, yDim, xx,
135
			vx + j * yDim[0], &ione);
135
			vx + j * yDim[0], &ione);
136
    UNPROTECT(1);
136
    UNPROTECT(1);
137
    return val;
137
    return val;
138
}
138
}
Line 152... Line 152...
152
    if (yDim[0] != xDim[1])
152
    if (yDim[0] != xDim[1])
153
	error(_("Dimensions of a (%d,%d) and b (%d,%d) do not conform"),
153
	error(_("Dimensions of a (%d,%d) and b (%d,%d) do not conform"),
154
	      xDim[0], xDim[1], yDim[0], yDim[1]);
154
	      xDim[0], xDim[1], yDim[0], yDim[1]);
155
    for (i = 0; i < xDim[0]; i++)/* val[i,] := Y' %*% x[i,]  */
155
    for (i = 0; i < xDim[0]; i++)/* val[i,] := Y' %*% x[i,]  */
156
	F77_CALL(dtpmv)(uplo, "T", diag, yDim, yx,
156
	F77_CALL(dtpmv)(uplo, "T", diag, yDim, yx,
157
			vx + i * xDim[1], /* incr = */ xDim);
157
			vx + i, /* incr = */ xDim);
158
    UNPROTECT(1);
158
    UNPROTECT(1);
159
    return val;
159
    return val;
160
}
160
}
161
 
161
 
162
SEXP dtpMatrix_matrix_mm(SEXP x, SEXP y)
162
SEXP dtpMatrix_matrix_mm(SEXP x, SEXP y)