1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
<center><a href="https://gitlab.com/petsc/petsc/-/blob/966382dc56242773704ef5f5cee7aa2db3ebc577/include/petscmat_kokkos.hpp">Actual source code: petscmat_kokkos.hpp</a></center><br>
<html>
<head>
<title></title>
<meta name="generator" content="c2html 0.9.6">
<meta name="date" content="2025-04-30T18:14:50+00:00">
</head>
<body bgcolor="#FFFFFF">
<pre width=80>
<a name="line1"> 1: </a><font color="#A020F0">#pragma once</font>
<a name="line3"> 3: </a><font color="#A020F0">#include <petscconf.h></font>
<a name="line5"> 5: </a><font color="#B22222">/* SUBMANSEC = <a href="../manualpages/Mat/Mat.html">Mat</a> */</font>
<a name="line7"> 7: </a><font color="#A020F0">#if defined(PETSC_HAVE_KOKKOS)</font>
<a name="line9"> 9: </a><font color="#A020F0"> #include <Kokkos_Core.hpp></font>
<a name="line10"> 10: </a>#include <A href="../include/petscmat.h.html"><petscmat.h></A>
<a name="line12"> 12: </a><font color="#B22222">/*@C</font>
<a name="line13"> 13: </a><font color="#B22222"> <a href="../manualpages/Mat/MatCreateSeqAIJKokkosWithKokkosViews.html">MatCreateSeqAIJKokkosWithKokkosViews</a> - Creates a <a href="../manualpages/Mat/MATSEQAIJKOKKOS.html">MATSEQAIJKOKKOS</a> matrix with Kokkos views of the aij data</font>
<a name="line15"> 15: </a><font color="#B22222"> Synopsis:</font>
<a name="line16"> 16: </a>#include <A href="../include/petscmat_kokkos.hpp.html"><petscmat_kokkos.hpp></A>
<a name="line17"> 17: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/Mat/MatCreateSeqAIJKokkosWithKokkosViews.html">MatCreateSeqAIJKokkosWithKokkosViews</a> (<a href="../manualpages/Sys/MPI_Comm.html">MPI_Comm</a> comm, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> m, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> n, Kokkos::View<<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *>& i_d, Kokkos::View<<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *>& j_d, Kokkos::View<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> *>& a_d, <a href="../manualpages/Mat/Mat.html">Mat</a> *A);</font>
<a name="line19"> 19: </a><font color="#B22222"> Logically Collective, No Fortran Support</font>
<a name="line21"> 21: </a><font color="#B22222"> Input Parameter:</font>
<a name="line22"> 22: </a><font color="#B22222">+ comm - the MPI communicator</font>
<a name="line23"> 23: </a><font color="#B22222">- m - row size</font>
<a name="line24"> 24: </a><font color="#B22222">- n - the column size</font>
<a name="line25"> 25: </a><font color="#B22222">- i - the Kokkos view of row data (in Kokkos::DefaultExecutionSpace)</font>
<a name="line26"> 26: </a><font color="#B22222">- j - the Kokkos view of the column data (in Kokkos::DefaultExecutionSpace)</font>
<a name="line27"> 27: </a><font color="#B22222">- a - the Kokkos view of the values (in Kokkos::DefaultExecutionSpace)</font>
<a name="line29"> 29: </a><font color="#B22222"> Output Parameter:</font>
<a name="line30"> 30: </a><font color="#B22222">. A - the `<a href="../manualpages/Mat/MATSEQAIJKOKKOS.html">MATSEQAIJKOKKOS</a>` matrix</font>
<a name="line32"> 32: </a><font color="#B22222"> Level: intermediate</font>
<a name="line34"> 34: </a><font color="#B22222"> Notes:</font>
<a name="line35"> 35: </a><font color="#B22222"> Creates a <a href="../manualpages/Mat/Mat.html">Mat</a> given the csr data input as Kokkos views. This routine allows a <a href="../manualpages/Mat/Mat.html">Mat</a></font>
<a name="line36"> 36: </a><font color="#B22222"> to be built without involving the host. Don't modify entries in the views after this routine.</font>
<a name="line37"> 37: </a><font color="#B22222"> There should be no outstanding asynchronous operations on the views (ie this routine does not call fence()</font>
<a name="line38"> 38: </a><font color="#B22222"> before using the views)</font>
<a name="line40"> 40: </a><font color="#B22222">.seealso:</font>
<a name="line41"> 41: </a><font color="#B22222">@*/</font>
<a name="line42"> 42: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/Mat/MatCreateSeqAIJKokkosWithKokkosViews.html">MatCreateSeqAIJKokkosWithKokkosViews</a>(<a href="../manualpages/Sys/MPI_Comm.html">MPI_Comm</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, Kokkos::View<<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *> &, Kokkos::View<<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *> &, Kokkos::View<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> *> &, <a href="../manualpages/Mat/Mat.html">Mat</a> *);
<a name="line44"> 44: </a><font color="#A020F0">#endif</font>
</pre>
</body>
</html>
|