Lines Matching refs:yy
337 static PetscErrorCode MatMult_SeqAIJMKL(Mat A, Vec xx, Vec yy)
357 PetscCall(VecGetArray(yy, &y));
367 PetscCall(VecRestoreArray(yy, &y));
373 PetscErrorCode MatMult_SeqAIJMKL_SpMV2(Mat A, Vec xx, Vec yy)
382 /* If there are no nonzero entries, zero yy and return immediately. */
384 PetscCall(VecGetArray(yy, &y));
386 PetscCall(VecRestoreArray(yy, &y));
391 PetscCall(VecGetArray(yy, &y));
404 PetscCall(VecRestoreArray(yy, &y));
410 static PetscErrorCode MatMultTranspose_SeqAIJMKL(Mat A, Vec xx, Vec yy)
430 PetscCall(VecGetArray(yy, &y));
440 PetscCall(VecRestoreArray(yy, &y));
446 PetscErrorCode MatMultTranspose_SeqAIJMKL_SpMV2(Mat A, Vec xx, Vec yy)
455 /* If there are no nonzero entries, zero yy and return immediately. */
457 PetscCall(VecGetArray(yy, &y));
459 PetscCall(VecRestoreArray(yy, &y));
464 PetscCall(VecGetArray(yy, &y));
477 PetscCall(VecRestoreArray(yy, &y));
483 static PetscErrorCode MatMultAdd_SeqAIJMKL(Mat A, Vec xx, Vec yy, Vec zz)
505 PetscCall(VecGetArrayPair(yy, zz, &y, &z));
511 if (zz == yy) {
512 /* If zz and yy are the same vector, we can use MKL's mkl_xcsrmv(), which calculates y = alpha*A*x + beta*y. */
516 /* zz and yy are different vectors, so call MKL's mkl_xcsrmv() with beta=0, then add the result to z.
525 PetscCall(VecRestoreArrayPair(yy, zz, &y, &z));
531 PetscErrorCode MatMultAdd_SeqAIJMKL_SpMV2(Mat A, Vec xx, Vec yy, Vec zz)
544 /* If there are no nonzero entries, set zz = yy and return immediately. */
546 PetscCall(VecGetArrayPair(yy, zz, &y, &z));
548 PetscCall(VecRestoreArrayPair(yy, zz, &y, &z));
553 PetscCall(VecGetArrayPair(yy, zz, &y, &z));
562 if (zz == yy) {
563 /* If zz and yy are the same vector, we can use mkl_sparse_x_mv, which calculates y = alpha*A*x + beta*y,
567 /* zz and yy are different vectors, so we call mkl_sparse_x_mv with alpha=1.0 and beta=0.0, and then
568 * we add the contents of vector yy to the result; MKL sparse BLAS does not have a MatMultAdd equivalent. */
575 PetscCall(VecRestoreArrayPair(yy, zz, &y, &z));
581 static PetscErrorCode MatMultTransposeAdd_SeqAIJMKL(Mat A, Vec xx, Vec yy, Vec zz)
603 PetscCall(VecGetArrayPair(yy, zz, &y, &z));
609 if (zz == yy) {
610 /* If zz and yy are the same vector, we can use MKL's mkl_xcsrmv(), which calculates y = alpha*A*x + beta*y. */
614 /* zz and yy are different vectors, so call MKL's mkl_xcsrmv() with beta=0, then add the result to z.
623 PetscCall(VecRestoreArrayPair(yy, zz, &y, &z));
629 PetscErrorCode MatMultTransposeAdd_SeqAIJMKL_SpMV2(Mat A, Vec xx, Vec yy, Vec zz)
642 /* If there are no nonzero entries, set zz = yy and return immediately. */
644 PetscCall(VecGetArrayPair(yy, zz, &y, &z));
646 PetscCall(VecRestoreArrayPair(yy, zz, &y, &z));
651 PetscCall(VecGetArrayPair(yy, zz, &y, &z));
660 if (zz == yy) {
661 /* If zz and yy are the same vector, we can use mkl_sparse_x_mv, which calculates y = alpha*A*x + beta*y,
665 /* zz and yy are different vectors, so we call mkl_sparse_x_mv with alpha=1.0 and beta=0.0, and then
666 * we add the contents of vector yy to the result; MKL sparse BLAS does not have a MatMultAdd equivalent. */
673 PetscCall(VecRestoreArrayPair(yy, zz, &y, &z));