Lines Matching refs:yy
209 static PetscErrorCode MatMult_SeqBAIJMKL_SpMV2(Mat A, Vec xx, Vec yy)
217 /* If there are no nonzero entries, zero yy and return immediately. */
219 PetscCall(VecSet(yy, 0.0));
224 PetscCall(VecGetArray(yy, &y));
236 PetscCall(VecRestoreArray(yy, &y));
240 static PetscErrorCode MatMultTranspose_SeqBAIJMKL_SpMV2(Mat A, Vec xx, Vec yy)
248 /* If there are no nonzero entries, zero yy and return immediately. */
250 PetscCall(VecSet(yy, 0.0));
255 PetscCall(VecGetArray(yy, &y));
267 PetscCall(VecRestoreArray(yy, &y));
271 static PetscErrorCode MatMultAdd_SeqBAIJMKL_SpMV2(Mat A, Vec xx, Vec yy, Vec zz)
281 /* If there are no nonzero entries, set zz = yy and return immediately. */
283 PetscCall(VecCopy(yy, zz));
288 PetscCall(VecGetArrayPair(yy, zz, &y, &z));
296 if (zz == yy) {
297 /* If zz and yy are the same vector, we can use mkl_sparse_x_mv, which calculates y = alpha*A*x + beta*y,
301 /* zz and yy are different vectors, so we call mkl_sparse_x_mv with alpha=1.0 and beta=0.0, and then
302 * we add the contents of vector yy to the result; MKL sparse BLAS does not have a MatMultAdd equivalent. */
309 PetscCall(VecRestoreArrayPair(yy, zz, &y, &z));
313 static PetscErrorCode MatMultTransposeAdd_SeqBAIJMKL_SpMV2(Mat A, Vec xx, Vec yy, Vec zz)
324 /* If there are no nonzero entries, set zz = yy and return immediately. */
326 PetscCall(VecCopy(yy, zz));
331 PetscCall(VecGetArrayPair(yy, zz, &y, &z));
339 if (zz == yy) {
340 /* If zz and yy are the same vector, we can use mkl_sparse_x_mv, which calculates y = alpha*A*x + beta*y,
344 /* zz and yy are different vectors, so we call mkl_sparse_x_mv with alpha=1.0 and beta=0.0, and then
345 * we add the contents of vector yy to the result; MKL sparse BLAS does not have a MatMultAdd equivalent. */
352 PetscCall(VecRestoreArrayPair(yy, zz, &y, &z));