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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372
|
<center><a href="https://gitlab.com/petsc/petsc/-/blob/966382dc56242773704ef5f5cee7aa2db3ebc577/include/petscdmda_kokkos.hpp">Actual source code: petscdmda_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>#include <A href="../include/petscvec_kokkos.hpp.html"><petscvec_kokkos.hpp></A>
<a name="line4"> 4: </a>#include <A href="../include/petscdmda.h.html"><petscdmda.h></A>
<a name="line6"> 6: </a><font color="#B22222">/* MANSEC = <a href="../manualpages/DM/DM.html">DM</a> */</font>
<a name="line7"> 7: </a><font color="#B22222">/* SUBMANSEC = <a href="../manualpages/DMDA/DMDA.html">DMDA</a> */</font>
<a name="line9"> 9: </a><font color="#A020F0">#if defined(PETSC_HAVE_KOKKOS)</font>
<a name="line10"> 10: </a><font color="#A020F0"> #include <Kokkos_Core.hpp></font>
<a name="line11"> 11: </a><font color="#A020F0"> #include <Kokkos_OffsetView.hpp></font>
<a name="line13"> 13: </a><font color="#B22222">/*@C</font>
<a name="line14"> 14: </a><font color="#B22222"> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a> - Gets a Kokkos OffsetView that contains up-to-date data of a vector in the given memory space.</font>
<a name="line16"> 16: </a><font color="#B22222"> Synopsis:</font>
<a name="line17"> 17: </a>#include <A href="../include/petscdmda_kokkos.hpp.html"><petscdmda_kokkos.hpp></A>
<a name="line18"> 18: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>*,MemorySpace>* kv);</font>
<a name="line19"> 19: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>*,MemorySpace>* kv);</font>
<a name="line20"> 20: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecGetKokkosOffsetViewWrite(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>*,MemorySpace>* kv);</font>
<a name="line21"> 21: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>**,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line22"> 22: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>**,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line23"> 23: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecGetKokkosOffsetViewWrite(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>**,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line24"> 24: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>***,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line25"> 25: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>***,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line26"> 26: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecGetKokkosOffsetViewWrite(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>***,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line28"> 28: </a><font color="#B22222"> Logically Collective, No Fortran Support</font>
<a name="line30"> 30: </a><font color="#B22222"> Input Parameters:</font>
<a name="line31"> 31: </a><font color="#B22222">+ da - the distributed array</font>
<a name="line32"> 32: </a><font color="#B22222">- v - the vector, either a vector the same size as one obtained with `<a href="../manualpages/DM/DMCreateGlobalVector.html">DMCreateGlobalVector</a>()` or `<a href="../manualpages/DM/DMCreateLocalVector.html">DMCreateLocalVector</a>()`</font>
<a name="line34"> 34: </a><font color="#B22222"> Output Parameter:</font>
<a name="line35"> 35: </a><font color="#B22222">. kv - the Kokkos OffsetView with a user-specified template parameter MemorySpace</font>
<a name="line37"> 37: </a><font color="#B22222"> Notes:</font>
<a name="line38"> 38: </a><font color="#B22222"> Call `<a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>()` or `DMDAVecRestoreKokkosOffsetViewWrite()` once you have finished accessing the OffsetView.</font>
<a name="line40"> 40: </a><font color="#B22222"> If the vector is not of type `<a href="../manualpages/Vec/VECKOKKOS.html">VECKOKKOS</a>`, an error will be raised.</font>
<a name="line42"> 42: </a><font color="#B22222"> If the vector is a local vector (obtained with `<a href="../manualpages/DM/DMCreateLocalVector.html">DMCreateLocalVector</a>()` etc) then the ghost point locations are accessible. If it is</font>
<a name="line43"> 43: </a><font color="#B22222"> a global vector then the ghost points are not accessible. Of course with the local vector you will have to do the</font>
<a name="line44"> 44: </a><font color="#B22222"> appropriate `<a href="../manualpages/DM/DMGlobalToLocalBegin.html">DMGlobalToLocalBegin</a>()` and `<a href="../manualpages/DM/DMGlobalToLocalEnd.html">DMGlobalToLocalEnd</a>()` to have correct values in the ghost locations.</font>
<a name="line46"> 46: </a><font color="#B22222"> These routines are similar to `<a href="../manualpages/DMDA/DMDAVecGetArray.html">DMDAVecGetArray</a>()` and friends. One can read-only, write-only or read/write access the returned</font>
<a name="line47"> 47: </a><font color="#B22222"> Kokkos OffsetView. Note that passing in a constant OffsetView enables read-only access.</font>
<a name="line48"> 48: </a><font color="#B22222"> Currently, only two memory spaces are supported: HostMirrorMemorySpace and Kokkos::DefaultExecutionSpace::memory_space.</font>
<a name="line49"> 49: </a><font color="#B22222"> If needed, a memory copy will be internally called to copy the latest vector data to the specified memory space.</font>
<a name="line51"> 51: </a><font color="#B22222"> In C, to access the returned array of `<a href="../manualpages/DMDA/DMDAVecGetArray.html">DMDAVecGetArray</a>()`, the indexing is "backwards", i.e., array[k][j][i] (instead of array[i][j][k]),</font>
<a name="line52"> 52: </a><font color="#B22222"> where i, j, k are loop variables for the x, y, z dimensions respectively specified in `<a href="../manualpages/DMDA/DMDACreate3d.html">DMDACreate3d</a>()`, for example.</font>
<a name="line54"> 54: </a><font color="#B22222"> To give users the same experience as `<a href="../manualpages/DMDA/DMDAVecGetArray.html">DMDAVecGetArray</a>()`, we mandate the returned OffsetView always has Kokkos::LayoutRight (that is, rightest</font>
<a name="line55"> 55: </a><font color="#B22222"> subscript has a stride 1, as in C multi-dimensional arrays), regardless of whether the memory space is host or device. Thus it is important</font>
<a name="line56"> 56: </a><font color="#B22222"> to use Iterate::Right as IterateInner if one uses Kokkos::MDRangePolicy to access the OffsetView.</font>
<a name="line58"> 58: </a><font color="#B22222"> Note that the OffsetView kv's first dimension (i.e., the leftest, dim 0) corresponds to the <a href="../manualpages/DMDA/DMDA.html">DMDA</a>'s z direction, and its last dimension</font>
<a name="line59"> 59: </a><font color="#B22222"> (rightest) corresponds to <a href="../manualpages/DMDA/DMDA.html">DMDA</a>'s x direction.</font>
<a name="line61"> 61: </a><font color="#B22222"> If the vector is a global vector, we have</font>
<a name="line62"> 62: </a><font color="#B22222">.vb</font>
<a name="line63"> 63: </a><font color="#B22222"> kv.extent(0) = zm*dof, kv.begin(0) = zs*dof, kv.end(0) = (zs+zm)*dof</font>
<a name="line64"> 64: </a><font color="#B22222"> kv.extent(1) = ym*dof, kv.begin(1) = ys*dof, kv.end(1) = (ys+ym)*dof</font>
<a name="line65"> 65: </a><font color="#B22222"> kv.extent(2) = xm*dof, kv.begin(2) = xs*dof, kv.end(2) = (xs+xm)*dof</font>
<a name="line66"> 66: </a><font color="#B22222">.ve</font>
<a name="line67"> 67: </a><font color="#B22222"> If the vector is a local vector, we have</font>
<a name="line68"> 68: </a><font color="#B22222">.vb</font>
<a name="line69"> 69: </a><font color="#B22222"> kv.extent(0) = gzm*dof, kv.begin(0) = gzs*dof, kv.end(0) = (gzs+gzm)*dof</font>
<a name="line70"> 70: </a><font color="#B22222"> kv.extent(1) = gym*dof, kv.begin(1) = gys*dof, kv.end(1) = (gys+gym)*dof</font>
<a name="line71"> 71: </a><font color="#B22222"> kv.extent(2) = gxm*dof, kv.begin(2) = gxs*dof, kv.end(2) = (gxs+gxm)*dof</font>
<a name="line72"> 72: </a><font color="#B22222">.ve</font>
<a name="line74"> 74: </a><font color="#B22222"> The starts and widths above are obtained by</font>
<a name="line75"> 75: </a><font color="#B22222">.vb</font>
<a name="line76"> 76: </a><font color="#B22222"> <a href="../manualpages/DMDA/DMDAGetCorners.html">DMDAGetCorners</a>(da,&xs,&ys,&zs,&xm,&ym,&zm);</font>
<a name="line77"> 77: </a><font color="#B22222"> <a href="../manualpages/DMDA/DMDAGetGhostCorners.html">DMDAGetGhostCorners</a>(da,&gxs,&gys,&gzs,&gxm,&gym,&gzm);</font>
<a name="line78"> 78: </a><font color="#B22222">.ve</font>
<a name="line80"> 80: </a><font color="#B22222"> For example, to initialize a grid,</font>
<a name="line82"> 82: </a><font color="#B22222">.vb</font>
<a name="line83"> 83: </a><font color="#B22222"> typedef Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>***,Kokkos::LayoutRight,MemorySpace> PetscScalarKokkosOffsetView3D;</font>
<a name="line85"> 85: </a><font color="#B22222"> PetscScalarKokkosOffsetView3D kv;</font>
<a name="line86"> 86: </a><font color="#B22222"> DMDAVecGetKokkosOffsetViewWrite(da,v,&kv); // v is a global vector and we assume dof is 1</font>
<a name="line87"> 87: </a><font color="#B22222"> <a href="../manualpages/DMDA/DMDAGetCorners.html">DMDAGetCorners</a>(da,&xs,&ys,&zs,&xm,&ym,&zm);</font>
<a name="line89"> 89: </a><font color="#B22222"> parallel_for ("Label",MDRangePolicy <Rank<3, Iterate::Right, Iterate::Right>>(</font>
<a name="line90"> 90: </a><font color="#B22222"> {zs,ys,xs},{zs+zm,ys+ym,xs+xm}), KOKKOS_LAMBDA (<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> k,<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> j,<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> i) {</font>
<a name="line91"> 91: </a><font color="#B22222"> kv(k,j,i) = ...;</font>
<a name="line92"> 92: </a><font color="#B22222"> });</font>
<a name="line93"> 93: </a><font color="#B22222"> DMDAVecRestoreKokkosOffsetViewWrite(da,v,&kv);</font>
<a name="line94"> 94: </a><font color="#B22222">.ve</font>
<a name="line96"> 96: </a><font color="#B22222"> For a multi-component problem, one could cast the returned OffsetView to a user's type. But one has also to shrink</font>
<a name="line97"> 97: </a><font color="#B22222"> the OffsetView's extent accordingly. For example,</font>
<a name="line98"> 98: </a><font color="#B22222">.vb</font>
<a name="line99"> 99: </a><font color="#B22222"> typedef struct {</font>
<a name="line100">100: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> omega,temperature;</font>
<a name="line101">101: </a><font color="#B22222"> } Node;</font>
<a name="line103">103: </a><font color="#B22222"> using NodeKokkosOffsetView3D = Kokkos::Experimental::OffsetView<const Node***,Kokkos::LayoutRight,MemorySpace>;</font>
<a name="line104">104: </a><font color="#B22222"> DMDAVecGetKokkosOffsetViewWrite(da,v,&tv);</font>
<a name="line105">105: </a><font color="#B22222"> NodeKokkosOffsetView3D kv(reinterpret_cast<Node*>(tv.data()),{tv.begin(0)/dof,tv.begin(1)/dof,tv.begin(2)/dof}, {tv.end(0)/dof,tv.end(1)/dof,tv.end(2)/dof});</font>
<a name="line107">107: </a><font color="#B22222"> parallel_for ("Label",MDRangePolicy<Rank<3, Iterate::Right, Iterate::Right>>(</font>
<a name="line108">108: </a><font color="#B22222"> {zs,ys,xs},{zs+zm,ys+ym,xs+xm}), KOKKOS_LAMBDA (<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> k,<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> j,<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> i) {</font>
<a name="line109">109: </a><font color="#B22222"> kv(k,j,i).omega = ...;</font>
<a name="line110">110: </a><font color="#B22222"> });</font>
<a name="line111">111: </a><font color="#B22222"> DMDAVecRestoreKokkosOffsetViewWrite(da,v,&tv)`;</font>
<a name="line112">112: </a><font color="#B22222">.ve</font>
<a name="line114">114: </a><font color="#B22222"> Level: intermediate</font>
<a name="line116">116: </a><font color="#B22222">.seealso: `<a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>()`, `<a href="../manualpages/DMDA/DMDAGetGhostCorners.html">DMDAGetGhostCorners</a>()`, `<a href="../manualpages/DMDA/DMDAGetCorners.html">DMDAGetCorners</a>()`, `<a href="../manualpages/Vec/VecGetArray.html">VecGetArray</a>()`, `<a href="../manualpages/Vec/VecRestoreArray.html">VecRestoreArray</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArray.html">DMDAVecRestoreArray</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArrayDOF.html">DMDAVecRestoreArrayDOF</a>()`</font>
<a name="line117">117: </a><font color="#B22222"> `<a href="../manualpages/DMDA/DMDAVecGetArrayDOF.html">DMDAVecGetArrayDOF</a>()`, `<a href="../manualpages/DMDA/DMDAVecGetArrayWrite.html">DMDAVecGetArrayWrite</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArrayWrite.html">DMDAVecRestoreArrayWrite</a>()`, `<a href="../manualpages/DMDA/DMDAVecGetArrayRead.html">DMDAVecGetArrayRead</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArrayRead.html">DMDAVecRestoreArrayRead</a>()`,</font>
<a name="line118">118: </a><font color="#B22222"> `<a href="../manualpages/DMStag/DMStagVecGetArray.html">DMStagVecGetArray</a>()`</font>
<a name="line119">119: </a><font color="#B22222">@*/</font>
<a name="line120">120: </a>template <class MemorySpace>
<a name="line121">121: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> *, MemorySpace> *);
<a name="line122">122: </a>template <class MemorySpace>
<a name="line123">123: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> *, MemorySpace> *);
<a name="line124">124: </a>template <class MemorySpace>
<a name="line125">125: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecGetKokkosOffsetViewWrite(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> *, MemorySpace> *);
<a name="line127">127: </a>template <class MemorySpace>
<a name="line128">128: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> **, Kokkos::LayoutRight, MemorySpace> *);
<a name="line129">129: </a>template <class MemorySpace>
<a name="line130">130: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> **, Kokkos::LayoutRight, MemorySpace> *);
<a name="line131">131: </a>template <class MemorySpace>
<a name="line132">132: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecGetKokkosOffsetViewWrite(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> **, Kokkos::LayoutRight, MemorySpace> *);
<a name="line134">134: </a>template <class MemorySpace>
<a name="line135">135: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ***, Kokkos::LayoutRight, MemorySpace> *);
<a name="line136">136: </a>template <class MemorySpace>
<a name="line137">137: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ***, Kokkos::LayoutRight, MemorySpace> *);
<a name="line138">138: </a>template <class MemorySpace>
<a name="line139">139: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecGetKokkosOffsetViewWrite(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ***, Kokkos::LayoutRight, MemorySpace> *);
<a name="line141">141: </a><font color="#B22222">/*@C</font>
<a name="line142">142: </a><font color="#B22222"> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a> - Returns the Kokkos OffsetView that was gotten with `<a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>()`</font>
<a name="line144">144: </a><font color="#B22222"> Synopsis:</font>
<a name="line145">145: </a>#include <A href="../include/petscdmda_kokkos.hpp.html"><petscdmda_kokkos.hpp></A>
<a name="line146">146: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>*,MemorySpace>* kv);</font>
<a name="line147">147: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>*,MemorySpace>* kv);</font>
<a name="line148">148: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecRestoreKokkosOffsetViewWrite(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>*,MemorySpace>* kv);</font>
<a name="line149">149: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>**,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line150">150: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>**,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line151">151: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecRestoreKokkosOffsetViewWrite(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>**,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line152">152: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>***,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line153">153: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>***,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line154">154: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecRestoreKokkosOffsetViewWrite(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>***,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line156">156: </a><font color="#B22222"> Logically Collective, No Fortran Support</font>
<a name="line158">158: </a><font color="#B22222"> Input Parameters:</font>
<a name="line159">159: </a><font color="#B22222">+ da - the distributed array</font>
<a name="line160">160: </a><font color="#B22222">. v - the vector, either a vector the same size as one obtained with `<a href="../manualpages/DM/DMCreateGlobalVector.html">DMCreateGlobalVector</a>()` or `<a href="../manualpages/DM/DMCreateLocalVector.html">DMCreateLocalVector</a>()`</font>
<a name="line161">161: </a><font color="#B22222">- kv - the Kokkos OffsetView with a user-specified template parameter MemorySpace</font>
<a name="line163">163: </a><font color="#B22222"> Level: intermediate</font>
<a name="line165">165: </a><font color="#B22222"> Note:</font>
<a name="line166">166: </a><font color="#B22222"> If the vector is not of type `<a href="../manualpages/Vec/VECKOKKOS.html">VECKOKKOS</a>`, an error will be raised.</font>
<a name="line168">168: </a><font color="#B22222">.seealso: `<a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>()`, `<a href="../manualpages/DMDA/DMDAGetGhostCorners.html">DMDAGetGhostCorners</a>()`, `<a href="../manualpages/DMDA/DMDAGetCorners.html">DMDAGetCorners</a>()`, `<a href="../manualpages/Vec/VecGetArray.html">VecGetArray</a>()`, `<a href="../manualpages/Vec/VecRestoreArray.html">VecRestoreArray</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArray.html">DMDAVecRestoreArray</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArrayDOF.html">DMDAVecRestoreArrayDOF</a>()`</font>
<a name="line169">169: </a><font color="#B22222"> `<a href="../manualpages/DMDA/DMDAVecGetArrayDOF.html">DMDAVecGetArrayDOF</a>()`, `<a href="../manualpages/DMDA/DMDAVecGetArrayWrite.html">DMDAVecGetArrayWrite</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArrayWrite.html">DMDAVecRestoreArrayWrite</a>()`, `<a href="../manualpages/DMDA/DMDAVecGetArrayRead.html">DMDAVecGetArrayRead</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArrayRead.html">DMDAVecRestoreArrayRead</a>()`,</font>
<a name="line170">170: </a><font color="#B22222"> `<a href="../manualpages/DMStag/DMStagVecGetArray.html">DMStagVecGetArray</a>()`</font>
<a name="line171">171: </a><font color="#B22222">@*/</font>
<a name="line172">172: </a>template <class MemorySpace>
<a name="line173">173: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> *, MemorySpace> *);
<a name="line174">174: </a>template <class MemorySpace>
<a name="line175">175: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> *, MemorySpace> *);
<a name="line176">176: </a>template <class MemorySpace>
<a name="line177">177: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecRestoreKokkosOffsetViewWrite(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> *, MemorySpace> *);
<a name="line179">179: </a>template <class MemorySpace>
<a name="line180">180: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> **, Kokkos::LayoutRight, MemorySpace> *);
<a name="line181">181: </a>template <class MemorySpace>
<a name="line182">182: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> **, Kokkos::LayoutRight, MemorySpace> *);
<a name="line183">183: </a>template <class MemorySpace>
<a name="line184">184: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecRestoreKokkosOffsetViewWrite(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> **, Kokkos::LayoutRight, MemorySpace> *);
<a name="line186">186: </a>template <class MemorySpace>
<a name="line187">187: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ***, Kokkos::LayoutRight, MemorySpace> *);
<a name="line188">188: </a>template <class MemorySpace>
<a name="line189">189: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetView.html">DMDAVecRestoreKokkosOffsetView</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ***, Kokkos::LayoutRight, MemorySpace> *);
<a name="line190">190: </a>template <class MemorySpace>
<a name="line191">191: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecRestoreKokkosOffsetViewWrite(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ***, Kokkos::LayoutRight, MemorySpace> *);
<a name="line193">193: </a><font color="#B22222">/*@C</font>
<a name="line194">194: </a><font color="#B22222"> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a> - Gets a Kokkos OffsetView that contains up-to-date data of a vector in the given memory space, with DOF as the rightest dimension of the OffsetView</font>
<a name="line196">196: </a><font color="#B22222"> Synopsis:</font>
<a name="line197">197: </a>#include <A href="../include/petscdmda_kokkos.hpp.html"><petscdmda_kokkos.hpp></A>
<a name="line198">198: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>**,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line199">199: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>**,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line200">200: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecGetKokkosOffsetViewDOFWrite(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>**,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line201">201: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>***,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line202">202: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>***,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line203">203: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecGetKokkosOffsetViewDOFWrite(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>***,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line204">204: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>****,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line205">205: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>****,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line206">206: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecGetKokkosOffsetViewDOFWrite(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>****,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line208">208: </a><font color="#B22222"> Logically Collective, No Fortran Support</font>
<a name="line210">210: </a><font color="#B22222"> Input Parameters:</font>
<a name="line211">211: </a><font color="#B22222">+ da - the distributed array</font>
<a name="line212">212: </a><font color="#B22222">- v - the vector, either a vector the same size as one obtained with `<a href="../manualpages/DM/DMCreateGlobalVector.html">DMCreateGlobalVector</a>()` or `<a href="../manualpages/DM/DMCreateLocalVector.html">DMCreateLocalVector</a>()`</font>
<a name="line214">214: </a><font color="#B22222"> Output Parameter:</font>
<a name="line215">215: </a><font color="#B22222">. kv - the Kokkos OffsetView with a user-specified template parameter MemorySpace</font>
<a name="line217">217: </a><font color="#B22222"> Notes:</font>
<a name="line218">218: </a><font color="#B22222"> Call `<a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>()` or `DMDAVecRestoreKokkosOffsetViewDOFWrite()` once you have finished accessing the OffsetView.</font>
<a name="line220">220: </a><font color="#B22222"> If the vector is not a `<a href="../manualpages/Vec/VECKOKKOS.html">VECKOKKOS</a>` an error will be raised.</font>
<a name="line222">222: </a><font color="#B22222"> If the vector is a local vector (obtained with `<a href="../manualpages/DM/DMCreateLocalVector.html">DMCreateLocalVector</a>()` etc) then the ghost point locations are accessible. If it is</font>
<a name="line223">223: </a><font color="#B22222"> a global vector then the ghost points are not accessible. Of course with the local vector you will have to do the</font>
<a name="line224">224: </a><font color="#B22222"> appropriate `<a href="../manualpages/DM/DMGlobalToLocalBegin.html">DMGlobalToLocalBegin</a>()` and `<a href="../manualpages/DM/DMGlobalToLocalEnd.html">DMGlobalToLocalEnd</a>()` to have correct values in the ghost locations.</font>
<a name="line226">226: </a><font color="#B22222"> These routines are similar to `<a href="../manualpages/DMDA/DMDAVecGetArrayDOF.html">DMDAVecGetArrayDOF</a>()` and friends. One can read-only, write-only or read/write access the returned</font>
<a name="line227">227: </a><font color="#B22222"> Kokkos OffsetView. Note that passing in a constant OffsetView enables read-only access.</font>
<a name="line228">228: </a><font color="#B22222"> Currently, only two memory spaces are supported: HostMirrorMemorySpace and Kokkos::DefaultExecutionSpace::memory_space.</font>
<a name="line229">229: </a><font color="#B22222"> If needed, a memory copy will be internally called to copy the latest vector data to the given memory space.</font>
<a name="line231">231: </a><font color="#B22222"> In C, to access the returned array of `<a href="../manualpages/DMDA/DMDAVecGetArrayDOF.html">DMDAVecGetArrayDOF</a>()`, the indexing is "backwards", i.e., array[k][j][i][c] (instead of array[c][i][j][k]),</font>
<a name="line232">232: </a><font color="#B22222"> where i, j, k are loop variables for the x, y, z dimensions respectively, and c is the loop variable for DOFs, as specified in `<a href="../manualpages/DMDA/DMDACreate3d.html">DMDACreate3d</a>()`,</font>
<a name="line233">233: </a><font color="#B22222"> for example.</font>
<a name="line235">235: </a><font color="#B22222"> To give users the same experience as `<a href="../manualpages/DMDA/DMDAVecGetArrayDOF.html">DMDAVecGetArrayDOF</a>()`, we mandate the returned OffsetView always has Kokkos::LayoutRight (that is, rightest</font>
<a name="line236">236: </a><font color="#B22222"> subscript has a stride 1, as in C multi-dimensional arrays), regardless of whether the memory space is host or device. Thus it is important</font>
<a name="line237">237: </a><font color="#B22222"> to use Iterate::Right as IterateInner if one uses Kokkos::MDRangePolicy to access the OffsetView.</font>
<a name="line239">239: </a><font color="#B22222"> Note that for a 3D `<a href="../manualpages/DMDA/DMDA.html">DMDA</a>`, the OffsetView kv's first dimension (i.e., the leftest, dim 0) corresponds to <a href="../manualpages/DMDA/DMDA.html">DMDA</a>'s z direction, and its second-to-last dimension</font>
<a name="line240">240: </a><font color="#B22222"> (rightest) corresponds to <a href="../manualpages/DMDA/DMDA.html">DMDA</a>'s x direction.</font>
<a name="line242">242: </a><font color="#B22222"> If the vector is a global vector, we have</font>
<a name="line243">243: </a><font color="#B22222">.vb</font>
<a name="line244">244: </a><font color="#B22222"> kv.extent(0) = zm, kv.begin(0) = zs, kv.end(0) = zs+zm</font>
<a name="line245">245: </a><font color="#B22222"> kv.extent(1) = ym, kv.begin(1) = ys, kv.end(1) = ys+ym</font>
<a name="line246">246: </a><font color="#B22222"> kv.extent(2) = xm, kv.begin(2) = xs, kv.end(2) = xs+xm</font>
<a name="line247">247: </a><font color="#B22222"> kv.extent(3) = dof, kv.begin(3) = 0, kv.end(3) = dof</font>
<a name="line248">248: </a><font color="#B22222">.ve</font>
<a name="line249">249: </a><font color="#B22222"> If the vector is a local vector, we have</font>
<a name="line250">250: </a><font color="#B22222">.vb</font>
<a name="line251">251: </a><font color="#B22222"> kv.extent(0) = gzm, kv.begin(0) = gzs, kv.end(0) = gzs+gzm</font>
<a name="line252">252: </a><font color="#B22222"> kv.extent(1) = gym, kv.begin(1) = gys, kv.end(1) = gys+gym</font>
<a name="line253">253: </a><font color="#B22222"> kv.extent(2) = gxm, kv.begin(2) = gxs, kv.end(2) = gxs+gxm</font>
<a name="line254">254: </a><font color="#B22222"> kv.extent(3) = dof, kv.begin(3) = 0, kv.end(3) = dof</font>
<a name="line255">255: </a><font color="#B22222">.ve</font>
<a name="line257">257: </a><font color="#B22222"> The starts and widths above are obtained by</font>
<a name="line258">258: </a><font color="#B22222">.vb</font>
<a name="line259">259: </a><font color="#B22222"> <a href="../manualpages/DMDA/DMDAGetCorners.html">DMDAGetCorners</a>(da,&xs,&ys,&zs,&xm,&ym,&zm);</font>
<a name="line260">260: </a><font color="#B22222"> <a href="../manualpages/DMDA/DMDAGetGhostCorners.html">DMDAGetGhostCorners</a>(da,&gxs,&gys,&gzs,&gxm,&gym,&gzm);</font>
<a name="line261">261: </a><font color="#B22222">.ve</font>
<a name="line263">263: </a><font color="#B22222"> For example, to initialize a grid,</font>
<a name="line264">264: </a><font color="#B22222">.vb</font>
<a name="line265">265: </a><font color="#B22222"> typedef Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>****,Kokkos::LayoutRight,MemorySpace> PetscScalarKokkosOffsetView4D;</font>
<a name="line267">267: </a><font color="#B22222"> PetscScalarKokkosOffsetView4D kv;</font>
<a name="line268">268: </a><font color="#B22222"> DMDAVecGetKokkosOffsetViewDOFWrite(da,v,&kv); // v is a global vector</font>
<a name="line269">269: </a><font color="#B22222"> <a href="../manualpages/DMDA/DMDAGetCorners.html">DMDAGetCorners</a>(da,&xs,&ys,&zs,&xm,&ym,&zm);</font>
<a name="line271">271: </a><font color="#B22222"> parallel_for ("Label",MDRangePolicy <Rank<4, Iterate::Right, Iterate::Right>>(</font>
<a name="line272">272: </a><font color="#B22222"> {zs,ys,xs,0},{zs+zm,ys+ym,xs+xm,dof}), KOKKOS_LAMBDA (<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> k,<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> j,<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> i,<a href="../manualpages/Sys/PetscInt.html">PetscInt</a> c) {</font>
<a name="line273">273: </a><font color="#B22222"> kv(k,j,i,c) = ...;</font>
<a name="line274">274: </a><font color="#B22222"> });</font>
<a name="line275">275: </a><font color="#B22222"> DMDAVecRestoreKokkosOffsetViewDOFWrite(da,v,&kv);</font>
<a name="line276">276: </a><font color="#B22222">.ve</font>
<a name="line278">278: </a><font color="#B22222"> Level: intermediate</font>
<a name="line280">280: </a><font color="#B22222">.seealso: `<a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>()`, `<a href="../manualpages/DMDA/DMDAGetGhostCorners.html">DMDAGetGhostCorners</a>()`, `<a href="../manualpages/DMDA/DMDAGetCorners.html">DMDAGetCorners</a>()`, `<a href="../manualpages/Vec/VecGetArray.html">VecGetArray</a>()`, `<a href="../manualpages/Vec/VecRestoreArray.html">VecRestoreArray</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArray.html">DMDAVecRestoreArray</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArrayDOF.html">DMDAVecRestoreArrayDOF</a>()`</font>
<a name="line281">281: </a><font color="#B22222"> `<a href="../manualpages/DMDA/DMDAVecGetArrayDOF.html">DMDAVecGetArrayDOF</a>()`, `<a href="../manualpages/DMDA/DMDAVecGetArrayWrite.html">DMDAVecGetArrayWrite</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArrayWrite.html">DMDAVecRestoreArrayWrite</a>()`, `<a href="../manualpages/DMDA/DMDAVecGetArrayRead.html">DMDAVecGetArrayRead</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArrayRead.html">DMDAVecRestoreArrayRead</a>()`,</font>
<a name="line282">282: </a><font color="#B22222"> `<a href="../manualpages/DMStag/DMStagVecGetArray.html">DMStagVecGetArray</a>()`</font>
<a name="line283">283: </a><font color="#B22222">@*/</font>
<a name="line284">284: </a>template <class MemorySpace>
<a name="line285">285: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> **, Kokkos::LayoutRight, MemorySpace> *);
<a name="line286">286: </a>template <class MemorySpace>
<a name="line287">287: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> **, Kokkos::LayoutRight, MemorySpace> *);
<a name="line288">288: </a>template <class MemorySpace>
<a name="line289">289: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecGetKokkosOffsetViewDOFWrite(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> **, Kokkos::LayoutRight, MemorySpace> *);
<a name="line291">291: </a>template <class MemorySpace>
<a name="line292">292: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ***, Kokkos::LayoutRight, MemorySpace> *);
<a name="line293">293: </a>template <class MemorySpace>
<a name="line294">294: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ***, Kokkos::LayoutRight, MemorySpace> *);
<a name="line295">295: </a>template <class MemorySpace>
<a name="line296">296: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecGetKokkosOffsetViewDOFWrite(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ***, Kokkos::LayoutRight, MemorySpace> *);
<a name="line298">298: </a>template <class MemorySpace>
<a name="line299">299: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ****, Kokkos::LayoutRight, MemorySpace> *);
<a name="line300">300: </a>template <class MemorySpace>
<a name="line301">301: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ****, Kokkos::LayoutRight, MemorySpace> *);
<a name="line302">302: </a>template <class MemorySpace>
<a name="line303">303: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecGetKokkosOffsetViewDOFWrite(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ****, Kokkos::LayoutRight, MemorySpace> *);
<a name="line305">305: </a><font color="#B22222">/*@C</font>
<a name="line306">306: </a><font color="#B22222"> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a> - Returns the Kokkos OffsetView that was gotten from `<a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>()`</font>
<a name="line308">308: </a><font color="#B22222"> Synopsis:</font>
<a name="line309">309: </a>#include <A href="../include/petscdmda_kokkos.hpp.html"><petscdmda_kokkos.hpp></A>
<a name="line310">310: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>**,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line311">311: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>**,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line312">312: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecRestoreKokkosOffsetViewDOFWrite(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>**,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line313">313: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>***,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line314">314: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>***,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line315">315: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecRestoreKokkosOffsetViewDOFWrite(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>***,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line316">316: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>****,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line317">317: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>****,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line318">318: </a><font color="#B22222"> <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecRestoreKokkosOffsetViewDOFWrite(<a href="../manualpages/DM/DM.html">DM</a> da,<a href="../manualpages/Vec/Vec.html">Vec</a> v,Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a>****,Kokkos::LayoutRight,MemorySpace>* kv);</font>
<a name="line320">320: </a><font color="#B22222"> Logically Collective, No Fortran Support</font>
<a name="line322">322: </a><font color="#B22222"> Input Parameters:</font>
<a name="line323">323: </a><font color="#B22222">+ da - the distributed array</font>
<a name="line324">324: </a><font color="#B22222">. v - the vector, either a vector the same size as one obtained with `<a href="../manualpages/DM/DMCreateGlobalVector.html">DMCreateGlobalVector</a>()` or `<a href="../manualpages/DM/DMCreateLocalVector.html">DMCreateLocalVector</a>()`</font>
<a name="line325">325: </a><font color="#B22222">- kv - the Kokkos OffsetView with a user-specified template parameter MemorySpace</font>
<a name="line327">327: </a><font color="#B22222"> Level: intermediate</font>
<a name="line329">329: </a><font color="#B22222"> Note:</font>
<a name="line330">330: </a><font color="#B22222"> If the vector is not of type `<a href="../manualpages/Vec/VECKOKKOS.html">VECKOKKOS</a>`, an error will be raised.</font>
<a name="line332">332: </a><font color="#B22222">.seealso: `<a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetViewDOF.html">DMDAVecGetKokkosOffsetViewDOF</a>()`, `<a href="../manualpages/DMDA/DMDAVecGetKokkosOffsetView.html">DMDAVecGetKokkosOffsetView</a>()`, `<a href="../manualpages/DMDA/DMDAGetGhostCorners.html">DMDAGetGhostCorners</a>()`, `<a href="../manualpages/DMDA/DMDAGetCorners.html">DMDAGetCorners</a>()`, `<a href="../manualpages/Vec/VecGetArray.html">VecGetArray</a>()`, `<a href="../manualpages/Vec/VecRestoreArray.html">VecRestoreArray</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArray.html">DMDAVecRestoreArray</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArrayDOF.html">DMDAVecRestoreArrayDOF</a>()`</font>
<a name="line333">333: </a><font color="#B22222"> `<a href="../manualpages/DMDA/DMDAVecGetArrayDOF.html">DMDAVecGetArrayDOF</a>()`, `<a href="../manualpages/DMDA/DMDAVecGetArrayWrite.html">DMDAVecGetArrayWrite</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArrayWrite.html">DMDAVecRestoreArrayWrite</a>()`, `<a href="../manualpages/DMDA/DMDAVecGetArrayRead.html">DMDAVecGetArrayRead</a>()`, `<a href="../manualpages/DMDA/DMDAVecRestoreArrayRead.html">DMDAVecRestoreArrayRead</a>()`,</font>
<a name="line334">334: </a><font color="#B22222"> `<a href="../manualpages/DMStag/DMStagVecGetArray.html">DMStagVecGetArray</a>()`</font>
<a name="line335">335: </a><font color="#B22222">@*/</font>
<a name="line336">336: </a>template <class MemorySpace>
<a name="line337">337: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> **, Kokkos::LayoutRight, MemorySpace> *);
<a name="line338">338: </a>template <class MemorySpace>
<a name="line339">339: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> **, Kokkos::LayoutRight, MemorySpace> *);
<a name="line340">340: </a>template <class MemorySpace>
<a name="line341">341: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecRestoreKokkosOffsetViewDOFWrite(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> **, Kokkos::LayoutRight, MemorySpace> *);
<a name="line343">343: </a>template <class MemorySpace>
<a name="line344">344: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ***, Kokkos::LayoutRight, MemorySpace> *);
<a name="line345">345: </a>template <class MemorySpace>
<a name="line346">346: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ***, Kokkos::LayoutRight, MemorySpace> *);
<a name="line347">347: </a>template <class MemorySpace>
<a name="line348">348: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecRestoreKokkosOffsetViewDOFWrite(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ***, Kokkos::LayoutRight, MemorySpace> *);
<a name="line350">350: </a>template <class MemorySpace>
<a name="line351">351: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<const <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ****, Kokkos::LayoutRight, MemorySpace> *);
<a name="line352">352: </a>template <class MemorySpace>
<a name="line353">353: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/DMDA/DMDAVecRestoreKokkosOffsetViewDOF.html">DMDAVecRestoreKokkosOffsetViewDOF</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ****, Kokkos::LayoutRight, MemorySpace> *);
<a name="line354">354: </a>template <class MemorySpace>
<a name="line355">355: </a><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDAVecRestoreKokkosOffsetViewDOFWrite(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, Kokkos::Experimental::OffsetView<<a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> ****, Kokkos::LayoutRight, MemorySpace> *);
<a name="line356">356: </a><font color="#A020F0">#endif</font>
</pre>
</body>
</html>
|