| /libCEED/rust/libceed/src/ |
| H A D | vector.rs | 22 pub enum VectorOpt<'a> { 23 Some(&'a Vector<'a>), 28 impl<'a> From<&'a Vector<'_>> for VectorOpt<'a> { 29 fn from(vec: &'a Vector) -> Self { in from() 35 impl<'a> VectorOpt<'a> { 127 pub struct VectorSliceWrapper<'a> { 128 pub(crate) vector: Vector<'a>, 129 pub(crate) _slice: &'a mut [crate::Scalar], 135 impl<'a> Drop for VectorSliceWrapper<'a> { 150 impl<'a> VectorSliceWrapper<'a> { [all …]
|
| H A D | qfunction.rs | 15 pub type QFunctionInputs<'a> = [&'a [crate::Scalar]; MAX_QFUNCTION_FIELDS]; 16 pub type QFunctionOutputs<'a> = [&'a mut [crate::Scalar]; MAX_QFUNCTION_FIELDS]; 22 pub struct QFunctionField<'a> { 24 _lifeline: PhantomData<&'a ()>, 30 impl<'a> QFunctionField<'a> { 118 pub enum QFunctionOpt<'a> { 119 SomeQFunction(&'a QFunction<'a>), 120 SomeQFunctionByName(&'a QFunctionByName<'a>), 125 impl<'a> From<&'a QFunction<'_>> for QFunctionOpt<'a> { 126 fn from(qfunc: &'a QFunction) -> Self { in from() [all …]
|
| H A D | lib.rs | 382 pub fn vector<'a>(&self, n: usize) -> Result<Vector<'a>> { in vector() argument 401 pub fn vector_from_slice<'a>(&self, slice: &[crate::Scalar]) -> Result<Vector<'a>> { in vector_from_slice() argument 445 pub fn elem_restriction<'a>( in elem_restriction() 454 ) -> Result<ElemRestriction<'a>> { in elem_restriction() argument 509 pub fn oriented_elem_restriction<'a>( in oriented_elem_restriction() 519 ) -> Result<ElemRestriction<'a>> { in oriented_elem_restriction() argument 596 pub fn curl_oriented_elem_restriction<'a>( in curl_oriented_elem_restriction() 606 ) -> Result<ElemRestriction<'a>> { in curl_oriented_elem_restriction() argument 648 pub fn strided_elem_restriction<'a>( in strided_elem_restriction() 655 ) -> Result<ElemRestriction<'a>> { argument [all …]
|
| H A D | basis.rs | 17 pub enum BasisOpt<'a> { 18 Some(&'a Basis<'a>), 22 impl<'a> From<&'a Basis<'_>> for BasisOpt<'a> { 23 fn from(basis: &'a Basis) -> Self { in from() 28 impl<'a> BasisOpt<'a> { 86 pub struct Basis<'a> { 88 _lifeline: PhantomData<&'a ()>, 94 impl<'a> Drop for Basis<'a> { 107 impl<'a> fmt::Display for Basis<'a> { 135 impl<'a> Basis<'a> {
|
| H A D | operator.rs | 24 pub struct OperatorField<'a> { 26 pub(crate) vector: crate::Vector<'a>, 27 pub(crate) elem_restriction: crate::ElemRestriction<'a>, 28 pub(crate) basis: crate::Basis<'a>, 29 _lifeline: PhantomData<&'a ()>, 35 impl<'a> OperatorField<'a> { 303 pub(crate) struct OperatorCore<'a> { 305 _lifeline: PhantomData<&'a ()>, 309 pub struct Operator<'a> { 310 op_core: OperatorCore<'a>, [all …]
|
| H A D | elem_restriction.rs | 17 pub enum ElemRestrictionOpt<'a> { 18 Some(&'a ElemRestriction<'a>), 22 impl<'a> From<&'a ElemRestriction<'_>> for ElemRestrictionOpt<'a> { 23 fn from(rstr: &'a ElemRestriction) -> Self { in from() 28 impl<'a> ElemRestrictionOpt<'a> { 99 pub struct ElemRestriction<'a> { 101 _lifeline: PhantomData<&'a ()>, 107 impl<'a> Drop for ElemRestriction<'a> { 120 impl<'a> fmt::Display for ElemRestriction<'a> { 154 impl<'a> ElemRestriction<'a> {
|
| /libCEED/include/ceed/ |
| H A D | deprecated.h | 22 …ic inline int CeedCompositeOperatorCreate(Ceed a, CeedOperator *b) { return CeedOperatorCreateComp… in CeedCompositeOperatorCreate() argument 24 …ne int CeedCompositeOperatorAddSub(CeedOperator a, CeedOperator b) { return CeedOperatorCompositeA… in CeedCompositeOperatorAddSub() argument 26 …int CeedCompositeOperatorGetNumSub(CeedOperator a, CeedInt *b) { return CeedOperatorCompositeGetNu… in CeedCompositeOperatorGetNumSub() argument 28 …CeedCompositeOperatorGetSubList(CeedOperator a, CeedOperator **b) { return CeedOperatorCompositeGe… in CeedCompositeOperatorGetSubList() argument 30 static inline int CeedCompositeOperatorGetSubByName(CeedOperator a, const char *b, CeedOperator *c)… in CeedCompositeOperatorGetSubByName() argument 31 return CeedOperatorCompositeGetSubByName(a, b, c); in CeedCompositeOperatorGetSubByName() 34 static inline int CeedCompositeOperatorGetMultiplicity(CeedOperator a, CeedInt b, CeedInt *c, CeedV… in CeedCompositeOperatorGetMultiplicity() argument 35 return CeedOperatorCompositeGetMultiplicity(a, b, c, d); in CeedCompositeOperatorGetMultiplicity()
|
| /libCEED/examples/rust/ex3-volume/src/ |
| H A D | main.rs | 170 let mut a = [0.0; 9]; in example_3() localVariable 173 a[k * 3 + j] = jacobian[i + q * ((j + 1) % 3 + 3 * ((k + 1) % 3))] in example_3() 181 * (jacobian[i + q * 0] * a[0 * 3 + 0] in example_3() 182 + jacobian[i + q * 1] * a[0 * 3 + 1] in example_3() 183 + jacobian[i + q * 2] * a[0 * 3 + 2]); in example_3() 185 / (jacobian[i + q * 0] * a[0 * 3 + 0] in example_3() 186 + jacobian[i + q * 1] * a[0 * 3 + 1] in example_3() 187 + jacobian[i + q * 2] * a[0 * 3 + 2]); in example_3() 190 * (a[0 * 3 + 0] * a[0 * 3 + 0] in example_3() 191 + a[0 * 3 + 1] * a[0 * 3 + 1] in example_3() [all …]
|
| /libCEED/python/tests/ |
| H A D | test-1-vector.py | 39 a = np.arange(10, 10 + n, dtype=ceed.scalar_type()) 40 x.set_array(a, cmode=libceed.USE_POINTER) 56 a = np.arange(10, 10 + n, dtype=ceed.scalar_type()) 57 x.set_array(a, cmode=libceed.USE_POINTER) 85 a = x.get_array_read() 104 a = np.arange(10, 10 + n, dtype=ceed.scalar_type()) 105 x.set_array(a, cmode=libceed.USE_POINTER) 125 a = np.zeros(n, dtype=ceed.scalar_type()) 126 x.set_array(a, cmode=libceed.USE_POINTER) 132 assert a[3] == np.float32(-3.14) [all …]
|
| /libCEED/examples/rust/ex3-volume-vector/src/ |
| H A D | main.rs | 172 let mut a = [0.0; 9]; in example_3_vector() localVariable 175 a[k * 3 + j] = jacobian[i + q * ((j + 1) % 3 + 3 * ((k + 1) % 3))] in example_3_vector() 183 * (jacobian[i + q * 0] * a[0 * 3 + 0] in example_3_vector() 184 + jacobian[i + q * 1] * a[0 * 3 + 1] in example_3_vector() 185 + jacobian[i + q * 2] * a[0 * 3 + 2]); in example_3_vector() 187 / (jacobian[i + q * 0] * a[0 * 3 + 0] in example_3_vector() 188 + jacobian[i + q * 1] * a[0 * 3 + 1] in example_3_vector() 189 + jacobian[i + q * 2] * a[0 * 3 + 2]); in example_3_vector() 192 * (a[0 * 3 + 0] * a[0 * 3 + 0] in example_3_vector() 193 + a[0 * 3 + 1] * a[0 * 3 + 1] in example_3_vector() [all …]
|
| /libCEED/backends/avx/ |
| H A D | ceed-avx-tensor.c | 21 #define fmadd(c, a, b) (c) = _mm256_fmadd_pd((a), (b), (c)) argument 23 #define fmadd(c, a, b) (c) += _mm256_mul_pd((a), (b)) argument 33 #define fmadd(c, a, b) (c) = _mm_fmadd_ps((a), (b), (c)) argument 35 #define fmadd(c, a, b) (c) += _mm_mul_ps((a), (b)) argument 52 for (CeedInt a = 0; a < A; a++) { in CeedTensorContract_Avx_Blocked() local 58 … for (CeedInt cc = 0; cc < CC / 4; cc++) vv[jj][cc] = loadu(&v[(a * J + j + jj) * C + c + cc * 4]); in CeedTensorContract_Avx_Blocked() 64 fmadd(vv[jj][cc], tqv, loadu(&u[(a * B + b) * C + c + cc * 4])); in CeedTensorContract_Avx_Blocked() 69 … for (CeedInt cc = 0; cc < CC / 4; cc++) storeu(&v[(a * J + j + jj) * C + c + cc * 4], vv[jj][cc]); in CeedTensorContract_Avx_Blocked() 81 … for (CeedInt cc = 0; cc < CC / 4; cc++) vv[jj][cc] = loadu(&v[(a * J + j + jj) * C + c + cc * 4]); in CeedTensorContract_Avx_Blocked() 88 fmadd(vv[jj][cc], tqv, loadu(&u[(a * B + b) * C + c + cc * 4])); in CeedTensorContract_Avx_Blocked() [all …]
|
| /libCEED/examples/rust/ex2-surface/src/ |
| H A D | main.rs | 167 let mut a = [0.0; 9]; in example_2() localVariable 170 a[k * 3 + j] = jacobian[i + q * ((j + 1) % 3 + 3 * ((k + 1) % 3))] in example_2() 177 / (jacobian[i + q * 0] * a[0 * 3 + 0] in example_2() 178 + jacobian[i + q * 1] * a[0 * 3 + 1] in example_2() 179 + jacobian[i + q * 2] * a[0 * 3 + 2]); in example_2() 181 * (a[0 * 3 + 0] * a[0 * 3 + 0] in example_2() 182 + a[0 * 3 + 1] * a[0 * 3 + 1] in example_2() 183 + a[0 * 3 + 2] * a[0 * 3 + 2]); in example_2() 185 * (a[1 * 3 + 0] * a[1 * 3 + 0] in example_2() 186 + a[1 * 3 + 1] * a[1 * 3 + 1] in example_2() [all …]
|
| /libCEED/examples/rust/ex2-surface-vector/src/ |
| H A D | main.rs | 170 let mut a = [0.0; 9]; in example_2_vector() localVariable 173 a[k * 3 + j] = jacobian[i + q * ((j + 1) % 3 + 3 * ((k + 1) % 3))] in example_2_vector() 180 / (jacobian[i + q * 0] * a[0 * 3 + 0] in example_2_vector() 181 + jacobian[i + q * 1] * a[0 * 3 + 1] in example_2_vector() 182 + jacobian[i + q * 2] * a[0 * 3 + 2]); in example_2_vector() 184 * (a[0 * 3 + 0] * a[0 * 3 + 0] in example_2_vector() 185 + a[0 * 3 + 1] * a[0 * 3 + 1] in example_2_vector() 186 + a[0 * 3 + 2] * a[0 * 3 + 2]); in example_2_vector() 188 * (a[1 * 3 + 0] * a[1 * 3 + 0] in example_2_vector() 189 + a[1 * 3 + 1] * a[1 * 3 + 1] in example_2_vector() [all …]
|
| /libCEED/tests/ |
| H A D | t124-vector-f.f90 | 8 real*8 a(10) variable 22 call ceedvectorgetarraywrite(x,ceed_mem_host,a,aoffset,err) 24 a(i+aoffset)=3*i 26 call ceedvectorrestorearray(x,a,aoffset,err) 28 call ceedvectorgetarrayread(x,ceed_mem_host,a,aoffset,err) 30 diff=a(i+aoffset)-3*i 33 write(*,*) 'Error writing array a(',i,')=',a(i+aoffset) 37 call ceedvectorrestorearrayread(x,a,aoffset,err)
|
| H A D | t109-vector-f.f90 | 8 real*8 a(10) variable 24 a(i)=0 26 a(3)=-3.14 29 call ceedvectorsetarray(x,ceed_mem_host,ceed_use_pointer,a,aoffset,err) 44 diff=a(5)+3.14 47 write(*,*) 'Error protecting array a(3)=',a(3)
|
| H A D | t104-vector-f.f90 | 8 real*8 a(10) variable 23 a(i)=0 27 call ceedvectorsetarray(x,ceed_mem_host,ceed_use_pointer,a,aoffset,err) 31 diff=a(3)+3.14 34 write(*,*) 'Error writing array a(3)=',a(3)
|
| H A D | t114-vector.c | 12 CeedScalar a[len]; in main() local 18 for (CeedInt i = 0; i < len; i++) a[i] = len + i; in main() 19 CeedVectorSetArray(x, CEED_MEM_HOST, CEED_COPY_VALUES, a); in main() 23 for (CeedInt i = 0; i < len; i++) a[i] = 2 * len + i; in main() 24 CeedVectorSetArray(x, CEED_MEM_HOST, CEED_COPY_VALUES, a); in main()
|
| /libCEED/tests/output/ |
| H A D | t300-basis.out | 1 CeedBasis in a H^1 space on a line element 18 CeedBasis in a H^1 space on a line element 35 CeedBasis in a H^1 space on a line element
|
| H A D | t300-basis-f.out | 1 CeedBasis in a H^1 space on a line element 18 CeedBasis in a H^1 space on a line element 35 CeedBasis in a H^1 space on a line element
|
| /libCEED/julia/LibCEED.jl/src/ |
| H A D | CeedVector.jl | 20 Creates a `CeedVector` of given length. If `allocate` is false, then no memory is allocated. 48 Base.show(io::IO, v::CeedVector) = witharray_read(a -> show(io, a), v, MEM_HOST) 65 Set the [`CeedVector`](@ref) to a constant value. 72 Set the [`CeedVector`](@ref) to a constant value, synonymous to [`setvalue!`](@ref). 121 Set the array used by a [`CeedVector`](@ref), freeing any previously allocated array if 122 applicable. The backend may copy values to a different [`MemType`](@ref). See also 139 Sync the [`CeedVector`](@ref) to a specified [`MemType`](@ref). This function is used to 141 already synchronized, this function results in a no-op. 150 array is returns as a `Ptr{CeedScalar}`. 170 a = args[i] [all …]
|
| H A D | UserQFunction.jl | 99 "libCEED.jl.\nPlease use a different backend, for example: /gpu/cuda/shared ", 146 for a ∈ args[1:end-1] 147 if Meta.isexpr(a, :(=)) 148 a1 = Meta.quot(a.args[1]) 149 a2 = esc(a.args[2]) 151 elseif Meta.isexpr(a, :tuple) 152 arr_name = a.args[1] 153 inout = a.args[2].value 154 ndim = length(a.args) - 3 157 dims[d] = :(Int($(a.args[d+3]))) [all …]
|
| /libCEED/examples/python/ |
| H A D | tutorial-1-vector.ipynb | 9 …"This is a tutorial to illustrate the main feautures of the Python interface for [libCEED](https:/… 40 …"We illustrate the simple creation of a `libceed.Vector`, how to specify its size, and how to read… 77 …"* In the following example, we associate the data stored in a `libceed.Vector` with a `numpy.arra… 91 "a = np.arange(1, 4, dtype=\"float64\")\n", 92 "x.set_array(a, cmode=libceed.USE_POINTER)\n", 138 "a = np.arange(1, 1 + n, dtype=\"float64\")\n", 139 "x.set_array(a, cmode=libceed.USE_POINTER)\n", 164 "a = np.zeros(n, dtype=\"float64\")\n", 165 "x.set_array(a, cmode=libceed.USE_POINTER)\n", 169 "a[3]" [all …]
|
| /libCEED/include/ceed/jit-source/cuda/ |
| H A D | cuda-ref-basis-tensor-at-points.h | 87 const CeedInt a = k / (post * Q); in InterpAtPoints() local 90 …for (CeedInt b = 0; b < P; b++) v_k += s_chebyshev_interp_1d[j * BASIS_P_1D + b] * in[(a * P + b) … in InterpAtPoints() 111 for (CeedInt a = 0; a < pre; a++) { in InterpAtPoints() local 115 for (CeedInt b = 0; b < Q; b++) v_k += chebyshev_x[b] * in[(a * Q + b) * post + c]; in InterpAtPoints() 116 out[a * post + c] = v_k; in InterpAtPoints() 178 for (CeedInt a = 0; a < pre; a++) { in InterpTransposeAtPoints() local 181 …(CeedInt j = 0; j < Q; j++) atomicAdd(&out[(a * Q + (j + p) % Q) * post + c], chebyshev_x[(j + p) … in InterpTransposeAtPoints() 183 … for (CeedInt j = 0; j < Q; j++) out[(a * Q + j) * post + c] = chebyshev_x[j] * in[a * post + c]; in InterpTransposeAtPoints() 206 const CeedInt a = k / (post * P); in InterpTransposeAtPoints() local 209 …for (CeedInt b = 0; b < Q; b++) v_k += s_chebyshev_interp_1d[j + b * BASIS_P_1D] * in[(a * Q + b) … in InterpTransposeAtPoints() [all …]
|
| /libCEED/include/ceed/jit-source/hip/ |
| H A D | hip-ref-basis-tensor-at-points.h | 87 const CeedInt a = k / (post * Q); in InterpAtPoints() local 90 …for (CeedInt b = 0; b < P; b++) v_k += s_chebyshev_interp_1d[j * BASIS_P_1D + b] * in[(a * P + b) … in InterpAtPoints() 111 for (CeedInt a = 0; a < pre; a++) { in InterpAtPoints() local 115 for (CeedInt b = 0; b < Q; b++) v_k += chebyshev_x[b] * in[(a * Q + b) * post + c]; in InterpAtPoints() 116 out[a * post + c] = v_k; in InterpAtPoints() 178 for (CeedInt a = 0; a < pre; a++) { in InterpTransposeAtPoints() local 181 …(CeedInt j = 0; j < Q; j++) atomicAdd(&out[(a * Q + (j + p) % Q) * post + c], chebyshev_x[(j + p) … in InterpTransposeAtPoints() 183 … for (CeedInt j = 0; j < Q; j++) out[(a * Q + j) * post + c] = chebyshev_x[j] * in[a * post + c]; in InterpTransposeAtPoints() 206 const CeedInt a = k / (post * P); in InterpTransposeAtPoints() local 209 …for (CeedInt b = 0; b < Q; b++) v_k += s_chebyshev_interp_1d[j + b * BASIS_P_1D] * in[(a * Q + b) … in InterpTransposeAtPoints() [all …]
|
| /libCEED/julia/LibCEED.jl/.style/ |
| H A D | ceed_style.jl | 59 # Do nothing - represents a binary op with no textual representation. 60 # For example: `2a`, which is equivalent to `2 * a`. 124 # Check if there's a number literal on the LHS of a dot operator. 127 for (i, a) in enumerate(cst) 128 if CSTParser.isoperator(a) && CSTParser.isdotted(a) && CSTParser.isnumber(cst[i-1]) 135 for (i, a) in enumerate(cst) 136 nws_op = precedence(a) == CSTParser.TimesOp ? 0 : nws 137 if CSTParser.isoperator(a) 139 add_node!(t, pretty(style, a, s), s, join_lines=true) 145 elseif is_opcall(a) [all …]
|