Home
last modified time | relevance | path

Searched refs:x_ (Results 1 – 10 of 10) sorted by relevance

/petsc/src/ksp/ksp/utils/lmvm/tests/
H A Dlmvm_copy_test.c7 Vec x_, f_; in positiveVectorUpdate() local
11 PetscCall(VecDuplicate(x, &x_)); in positiveVectorUpdate()
13 PetscCall(VecSetRandom(x_, rand)); in positiveVectorUpdate()
15 PetscCall(VecDot(x_, f_, &dot)); in positiveVectorUpdate()
16 PetscCall(VecAXPY(x, PetscAbsScalar(dot) / dot, x_)); in positiveVectorUpdate()
19 PetscCall(VecDestroy(&x_)); in positiveVectorUpdate()
77 Vec x_, y_, z_; in testUnchangedBegin() local
80 PetscCall(MatCreateVecs(A, &x_, &y_)); in testUnchangedBegin()
82 PetscCall(VecSetRandom(x_, rand)); in testUnchangedBegin()
83 PetscCall(MatMult(A, x_, y_)); in testUnchangedBegin()
[all …]
/petsc/src/ksp/ksp/utils/lmvm/blas_cyclic/
H A Dblas_cyclic.c40 const PetscScalar *x_; in VecAXPBYCyclic() local
57 PetscCall(VecGetArrayReadAndMemType(x, &x_, &x_memtype)); in VecAXPBYCyclic()
61 if (m_local == m) PetscCall(AXPBYCyclic_CUPM_Private(m, oldest, next, alpha, x_, beta, y_, 1)); in VecAXPBYCyclic()
66 PetscCall(VecRestoreArrayReadAndMemType(x, &x_)); in VecAXPBYCyclic()
69 PetscCall(VecGetArrayRead(x, &x_)); in VecAXPBYCyclic()
71 PetscCall(AXPBYCylic_Private(m, oldest, next, alpha, x_, beta, y_, 1)); in VecAXPBYCyclic()
73 PetscCall(VecRestoreArrayRead(x, &x_)); in VecAXPBYCyclic()
108 const PetscScalar *x_; in VecDMVCyclic() local
130 PetscCall(VecGetArrayReadAndMemType(x, &x_, &x_memtype)); in VecDMVCyclic()
134 …) PetscCall(DMVCyclic_CUPM_Private(hermitian_transpose, m, oldest, next, alpha, A_, x_, beta, y_)); in VecDMVCyclic()
[all …]
/petsc/src/ksp/ksp/utils/lmvm/dense/cd_cupm/
H A Dcd_cupm.cxx31 auto x_ = cupmScalarPtrCast(x); in SolveInPlace() local
38 …mitian_transpose ? CUPMBLAS_OP_C : CUPMBLAS_OP_N, CUPMBLAS_DIAG_NON_UNIT, n, A_, lda, x_, stride)); in SolveInPlace()
57 auto x_ = cupmScalarPtrCast(x); in SolveInPlaceCyclic() local
68 …dle, CUPMBLAS_FILL_MODE_UPPER, CUPMBLAS_OP_N, CUPMBLAS_DIAG_NON_UNIT, n_new, A_, lda, x_, stride)); in SolveInPlaceCyclic()
69 …CUPMBLAS_OP_N, n_old, n_new, &minus_one, &A_[oldest_index], lda, x_, stride, &sone, &x_[oldest_ind… in SolveInPlaceCyclic()
70 …_OP_N, CUPMBLAS_DIAG_NON_UNIT, n_old, &A_[oldest_index * (lda + 1)], lda, &x_[oldest_index], strid… in SolveInPlaceCyclic()
72 …_OP_C, CUPMBLAS_DIAG_NON_UNIT, n_old, &A_[oldest_index * (lda + 1)], lda, &x_[oldest_index], strid… in SolveInPlaceCyclic()
73 …S_OP_C, n_old, n_new, &minus_one, &A_[oldest_index], lda, &x_[oldest_index], stride, &sone, x_, st… in SolveInPlaceCyclic()
74 …dle, CUPMBLAS_FILL_MODE_UPPER, CUPMBLAS_OP_C, CUPMBLAS_DIAG_NON_UNIT, n_new, A_, lda, x_, stride)); in SolveInPlaceCyclic()
/petsc/src/ksp/ksp/utils/lmvm/blas_cyclic/cupm/
H A Dblas_cyclic_cupm_impl.hpp34 auto x_ = cupmScalarPtrCast(x); in axpby_dispatch() local
41 PetscCallCUPMBLAS(cupmBlasXcopy(handle, n, x_, 1, y_, y_stride)); in axpby_dispatch()
44 if (alpha != 0.0) PetscCallCUPMBLAS(cupmBlasXaxpy(handle, n, calpha, x_, 1, y_, y_stride)); in axpby_dispatch()
94 const auto x_ = cupmScalarPtrCast(x); in dmv() local
110 PetscCallCUPMBLAS(cupmBlasXgbmv(handle, trans, m, m, 0, 0, calpha, A_, 1, x_, 1, cbeta, y_, 1)); in dmv()
114 …PetscCallCUPMBLAS(cupmBlasXgbmv(handle, trans, diff, diff, 0, 0, calpha, &A_[i_oldest], 1, &x_[i_o… in dmv()
118 …llCUPMBLAS(cupmBlasXgbmv(handle, trans, i_next, i_next, 0, 0, calpha, A_, 1, x_, 1, cbeta, y_, 1)); in dmv()
119 …(cupmBlasXgbmv(handle, trans, diff, diff, 0, 0, calpha, &A_[i_oldest], 1, &x_[i_oldest], 1, cbeta,… in dmv()
231 auto x_ = cupmScalarPtrCast(x); in hemv() local
246 …dle, CUPMBLAS_FILL_MODE_UPPER, n, calpha, &A_[i_oldest * (lda + 1)], lda, &x_[i_oldest], 1, cbeta,… in hemv()
[all …]
/petsc/doc/manual/
H A Ddt.md37 C(x) = \int^x_{x_-} P(s) ds
40 where $x_-$ is the lower limit of our domain. We can work out the effect of scaling on the CDF usin…
44 C(\lambda x) &= \int^{\lambda x}_{x_-} P(s) ds \\
45 &= \int^{x}_{x_-} \lambda^d P(\lambda t) dt \\
46 &= \int^{x}_{x_-} P(t) dt \\
H A Dvec.md674 …| ``VecSum(Vec x, PetscScalar *r);`` | :math:`r = \sum x_{i}` …
681 …| ``VecPointwiseMult(Vec w, Vec x, Vec y);`` | :math:`w_{i} = x_{i}*y_{i}` …
683 …| ``VecPointwiseDivide(Vec w, Vec x, Vec y);`` | :math:`w_{i} = x_{i}/y_{i}` …
691 …| ``VecMax(Vec x, PetscInt *idx, PetscReal *r);`` | :math:`r = \max x_{i}` …
693 …| ``VecMin(Vec x, PetscInt *idx, PetscReal *r);`` | :math:`r = \min x_{i}` …
695 …| ``VecAbs(Vec x);`` | :math:`x_i = |x_{i}|` …
697 …| ``VecReciprocal(Vec x);`` | :math:`x_i = 1/x_{i}` …
699 …| ``VecShift(Vec x, PetscScalar s);`` | :math:`x_i = s + x_{i}` …
710 `NORM_2`, or `NORM_INFINITY`. The 1-norm is $\sum_i |x_{i}|$,
711 the 2-norm is $( \sum_{i} x_{i}^{2})^{1/2}$ and the infinity norm
[all …]
H A Dtao.md29 f(x) = \sum_{i=0}^{m-1} \left( \alpha(x_{2i+1}-x_{2i}^2)^2 + (1-x_{2i})^2 \right),
1629 ${x_1,x_2,\ldots,x_{N+1}}$ and their corresponding objective
1631 iteration, $x_{N+1}$ is removed from the set and replaced with
1634 x(\mu) = (1+\mu) \frac{1}{N} \sum_{i=1}^N x_i - \mu x_{N+1},
1882 contribution of $y_k \equiv \nabla f(x_k) - \nabla f(x_{k-1})$ in
2392 x_{k+1} = x_k - \alpha_k(J_k^T J_k)^{-1} J_k^T r(x_k)
2415 $\beta(x) = \frac{1}{2}||x_k - x_{k-1}||_2^2$
2462 point $x_+$ to be evaluated is obtained by solving the
2483 The residual vector is then evaluated to obtain $F(x_+)$ and hence
2484 $f(x_+)$. The ratio of actual decrease to predicted decrease,
[all …]
H A Dmat.md598 the approximate Jacobian such that $s_k = x_k - x_{k-1}$ and
599 $y_k = f(x_k) - f(x_{k-1})$, where $k$ is the index for
/petsc/src/ksp/ksp/utils/lmvm/
H A Dlmbasis.c268 Vec x_ = x; in LMBasisGEMV() local
277 x_ = x_work; in LMBasisGEMV()
282 if (beta == 0.0) PetscCall(MatMult(A->vecs, x_, y)); in LMBasisGEMV()
283 else PetscCall(MatMultAdd(A->vecs, x_, y, y)); in LMBasisGEMV()
286 if (beta == 0.0) PetscCall(MatMultColumnRange(A->vecs, x_, y, oldest_idx, next_idx)); in LMBasisGEMV()
287 else PetscCall(MatMultAddColumnRange(A->vecs, x_, y, y, oldest_idx, next_idx)); in LMBasisGEMV()
289 if (beta == 0.0) PetscCall(MatMultColumnRange(A->vecs, x_, y, 0, next_idx)); in LMBasisGEMV()
290 else PetscCall(MatMultAddColumnRange(A->vecs, x_, y, y, 0, next_idx)); in LMBasisGEMV()
291 PetscCall(MatMultAddColumnRange(A->vecs, x_, y, y, oldest_idx, A->m)); in LMBasisGEMV()
/petsc/src/ksp/pc/impls/amgx/
H A Damgx.cxx333 PetscScalar *x_; in PCApply_AMGX() local
341 PetscCall(VecCUDAGetArrayWrite(x, &x_)); in PCApply_AMGX()
344 PetscCall(VecGetArrayWrite(x, &x_)); in PCApply_AMGX()
348 PetscCallAmgX(AMGX_vector_upload(amgx->sol, amgx->nLocalRows, 1, x_)); in PCApply_AMGX()
356 PetscCallAmgX(AMGX_vector_download(amgx->sol, x_)); in PCApply_AMGX()
359 PetscCall(VecCUDARestoreArrayWrite(x, &x_)); in PCApply_AMGX()
362 PetscCall(VecRestoreArrayWrite(x, &x_)); in PCApply_AMGX()