Home
last modified time | relevance | path

Searched refs:C (Results 1 – 25 of 65) sorted by relevance

123

/libCEED/julia/LibCEED.jl/examples/
H A Dex1-volume-c.jl1 using LibCEED.C, Printf, UnsafeArrays
2 using LibCEED.C: CeedInt, CeedScalar
109 el_nodes = zeros(C.CeedInt, num_elem*nnodes)
130 rstr = Ref{C.CeedElemRestriction}()
131 C.CeedElemRestrictionCreate(
138 C.CEED_MEM_HOST,
139 C.CEED_COPY_VALUES,
144 rstr_i = Ref{C.CeedElemRestriction}()
145 err = C.CeedElemRestrictionCreateStrided(
151 C.CEED_STRIDES_BACKEND[],
[all …]
/libCEED/julia/LibCEED.jl/src/
H A DGlobals.jl7 const CeedScalar = C.CeedScalar
14 const CeedInt = C.CeedInt
21 const CeedInt8 = C.CeedInt8
28 const CeedSize = C.CeedSize
35 const QuadMode = C.CeedQuadMode
36 const GAUSS = C.CEED_GAUSS
37 const GAUSS_LOBATTO = C.CEED_GAUSS_LOBATTO
44 const MemType = C.CeedMemType
45 const MEM_HOST = C.CEED_MEM_HOST
46 const MEM_DEVICE = C.CEED_MEM_DEVICE
[all …]
H A DQFunction.jl4 Base.getindex(::QFunctionNone) = C.CEED_QFUNCTION_NONE[]
16 ref::RefValue{C.CeedQFunction}
28 QFunction(ref::Ref{C.CeedQFunction}) = QFunction(ref, nothing)
29 destroy(qf::QFunction) = C.CeedQFunctionDestroy(qf.ref) # COV_EXCL_LINE
32 ceed_show(io, qf, C.CeedQFunctionView)
35 ref = Ref{C.CeedQFunction}()
37 # no C source for this Q-function
38 C.CeedQFunctionCreateInterior(c[], vlength, f.fptr, "", ref)
41 C.CeedQFunctionSetCUDAUserFunction(ref[], f.cuf)
73 ref = Ref{C.CeedQFunction}()
[all …]
H A DCeed.jl18 ceed::C.Ceed,
27 (:CeedErrorFormat, C.libceed),
29 (C.Ceed, Cstring, Ptr{Cvoid}),
41 ref::RefValue{C.Ceed}
50 obj = Ceed(Ref{C.Ceed}())
51 C.CeedInit(spec, obj.ref)
55 (C.Ceed, Cstring, Cint, Cstring, Cint, Cstring, Ptr{Cvoid})
57 C.CeedSetErrorHandler(obj.ref[], ehandler)
64 destroy(c::Ceed) = C.CeedDestroy(c.ref) # COV_EXCL_LINE
67 Base.show(io::IO, ::MIME"text/plain", c::Ceed) = ceed_show(io, c, C.CeedView)
[all …]
H A DRequest.jl4 Base.getindex(::RequestImmediate) = C.CEED_REQUEST_IMMEDIATE[]
7 Base.getindex(::RequestOrdered) = C.CEED_REQUEST_ORDERED[]
14 ref::RefValue{C.CeedRequest}
17 Request() = Request(Ref{C.CeedRequest}())
19 Base.wait(req::Request) = C.CeedRequestWait(req[])
H A DLibCEED.jl6 # import low-level C interface
7 include("C.jl")
8 using .C
168 configure_scalar_type(C.libceed_handle)
183 C.CeedGetVersion(major, minor, patch, release)
197 C.CeedGetVersion(major, minor, patch, release)
230 handle = C.dlopen(path)
231 set_preferences!(C.libCEED_jll, "libceed_path" => path; force=true)
237 (handle != C.libceed_handle) && C.dlclose(handle)
243 set_preferences!(C.libCEED_jll, "libceed_path" => nothing; force=true)
[all …]
H A DCeedVector.jl6 Base.getindex(::CeedVectorActive) = C.CEED_VECTOR_ACTIVE[]
9 Base.getindex(::CeedVectorNone) = C.CEED_VECTOR_NONE[]
12 ref::RefValue{C.CeedVector}
14 CeedVector(ref::Ref{C.CeedVector}) = new(ref, nothing)
25 ref = Ref{C.CeedVector}()
26 C.CeedVectorCreate(c[], len, ref)
37 destroy(v::CeedVector) = C.CeedVectorDestroy(v.ref) # COV_EXCL_LINE
51 len = Ref{C.CeedSize}()
52 C.CeedVectorGetLength(v[], len)
67 setvalue!(v::CeedVector, val::Real) = C.CeedVectorSetValue(v[], val)
[all …]
H A DContext.jl2 ref::RefValue{C.CeedQFunctionContext}
4 function Context(ref::Ref{C.CeedQFunctionContext})
8 C.CeedQFunctionContextDestroy(x.ref)
15 ceed_show(io, c, C.CeedQFunctionContextView)
26 cannot be freed from C.
29 ref = Ref{C.CeedQFunctionContext}()
30 C.CeedQFunctionContextCreate(c[], ref)
49 C.CeedQFunctionContextSetData(
H A DOperator.jl2 ref::RefValue{C.CeedOperator}
16 destroy(op::Operator) = C.CeedOperatorDestroy(op.ref) # COV_EXCL_LINE
18 Base.show(io::IO, ::MIME"text/plain", op::Operator) = ceed_show(io, op, C.CeedOperatorView)
59 ref = Ref{C.CeedOperator}()
60 C.CeedOperatorCreate(c[], qf[], dqf[], dqfT[], ref)
71 ref = Ref{C.CeedOperator}()
72 C.CeedOperatorCreateComposite(c[], ref)
76 C.CeedOperatorCompositeAddSub(comp_op[], op[])
88 C.CeedOperatorSetField(op[], fieldname, r[], b[], v[])
106 C.CeedOperatorApply(op[], vin[], vout[], request[])
[all …]
H A DBasis.jl9 Base.getindex(::BasisNone) = C.CEED_BASIS_NONE[]
24 ref::RefValue{C.CeedBasis}
34 destroy(b::Basis) = C.CeedBasisDestroy(b.ref) # COV_EXCL_LINE
36 Base.show(io::IO, ::MIME"text/plain", b::Basis) = ceed_show(io, b, C.CeedBasisView)
54 ref = Ref{C.CeedBasis}()
55 C.CeedBasisCreateTensorH1Lagrange(c[], dim, ncomp, p, q, quad_mode, ref)
98 ref = Ref{C.CeedBasis}()
99 C.CeedBasisCreateTensorH1(
156 ref = Ref{C.CeedBasis}()
157 C.CeedBasisCreateH1(
[all …]
H A DElemRestriction.jl9 Base.getindex(::ElemRestrictionNone) = C.CEED_ELEMRESTRICTION_NONE[]
19 ref::RefValue{C.CeedElemRestriction}
29 destroy(r::ElemRestriction) = C.CeedElemRestrictionDestroy(r.ref) # COV_EXCL_LINE
32 ceed_show(io, e, C.CeedElemRestrictionView)
81 ref = Ref{C.CeedElemRestriction}()
82 C.CeedElemRestrictionCreate(
148 ref = Ref{C.CeedElemRestriction}()
149 C.CeedElemRestrictionCreateOriented(
218 ref = Ref{C.CeedElemRestriction}()
219 C.CeedElemRestrictionCreateCurlOriented(
[all …]
/libCEED/examples/nek/
H A DSIZE.in1 C Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
2 C the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
3 C reserved. See files LICENSE and NOTICE for details.
4 C
5 C This file is part of CEED, a collection of benchmarks, miniapps, software
6 C libraries and APIs for efficient high-order finite element and spectral
7 C element discretizations for exascale applications. For more information and
8 C source code availability see http://github.com/ceed
9 C
10 C The CEED research is supported by the Exascale Computing Project (17-SC-20-SC)
[all …]
/libCEED/backends/avx/
H A Dceed-avx-tensor.c42 …TensorContract_Avx_Blocked(CeedTensorContract contract, CeedInt A, CeedInt B, CeedInt C, CeedInt J, in CeedTensorContract_Avx_Blocked() argument
55 for (CeedInt c = 0; c < (C / CC) * CC; c += CC) { in CeedTensorContract_Avx_Blocked()
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()
77 for (CeedInt c = 0; c < (C / CC) * CC; c += 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()
93 … 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()
104 …nsorContract_Avx_Remainder(CeedTensorContract contract, CeedInt A, CeedInt B, CeedInt C, CeedInt J, in CeedTensorContract_Avx_Remainder() argument
[all …]
/libCEED/backends/xsmm/
H A Dceed-xsmm-tensor.c17 …ntractApply_Xsmm(CeedTensorContract contract, CeedInt A, CeedInt B, CeedInt C, CeedInt J, const Ce… in CeedTensorContractApply_Xsmm() argument
19 if (C == 1) { in CeedTensorContractApply_Xsmm()
45 …? libxsmm_create_gemm_shape(C, J, B, C, !t_mode ? B : J, C, LIBXSMM_DATATYPE_F64, LIBXSMM_DATATYPE… in CeedTensorContractApply_Xsmm()
47 …: libxsmm_create_gemm_shape(C, J, B, C, !t_mode ? B : J, C, LIBXSMM_DATATYPE_F32, LIBXSMM_DATATYPE… in CeedTensorContractApply_Xsmm()
57 gemm_param.a.primary = (CeedScalar *)&u[a * B * C]; in CeedTensorContractApply_Xsmm()
58 gemm_param.c.primary = (CeedScalar *)&v[a * J * C]; in CeedTensorContractApply_Xsmm()
/libCEED/backends/opt/
H A Dceed-opt-tensor.c16 …nsorContractApply_Core_Opt(CeedTensorContract contract, CeedInt A, CeedInt B, CeedInt C, CeedInt J, in CeedTensorContractApply_Core_Opt() argument
30 for (CeedInt c = 0; c < C; c++) v[(a * J + j) * C + c] += tq * u[(a * B + b) * C + c]; in CeedTensorContractApply_Core_Opt()
40 static int CeedTensorContractApply_Opt(CeedTensorContract contract, CeedInt A, CeedInt B, CeedInt C in CeedTensorContractApply_Opt() argument
43 for (CeedInt q = 0; q < A * J * C; q++) v[q] = (CeedScalar)0.0; in CeedTensorContractApply_Opt()
46 if (C == 1) return CeedTensorContractApply_Core_Opt(contract, A, B, 1, J, t, t_mode, add, u, v); in CeedTensorContractApply_Opt()
47 else return CeedTensorContractApply_Core_Opt(contract, A, B, C, J, t, t_mode, add, u, v); in CeedTensorContractApply_Opt()
/libCEED/examples/nek/bps/
H A Dbps.usr1 C Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors
2 C All Rights Reserved. See the top-level COPYRIGHT and NOTICE files for details.
3 C
4 C SPDX-License-Identifier: (BSD-2-Clause)
5 C
6 C This file is part of CEED: http://github.com/ceed
8 C> @file
9 C> Mass and diffusion operators examples using Nek5000
13 C-----------------------------------------------------------------------
17 C Set up mass operator
[all …]
/libCEED/backends/ref/
H A Dceed-ref-tensor.c16 static int CeedTensorContractApply_Ref(CeedTensorContract contract, CeedInt A, CeedInt B, CeedInt C in CeedTensorContractApply_Ref() argument
26 for (CeedInt q = 0; q < A * J * C; q++) v[q] = (CeedScalar)0.0; in CeedTensorContractApply_Ref()
33 for (CeedInt c = 0; c < C; c++) v[(a * J + j) * C + c] += tq * u[(a * B + b) * C + c]; in CeedTensorContractApply_Ref()
/libCEED/examples/fluids/
H A Dpytorch_pkgconfig.py3 import torch.utils.cpp_extension as C namespace
24 variables['prefix'] = Path(C.library_paths()[0]).parent.as_posix()
31 for include_path in C.include_paths():
47 for lib_path in C.library_paths():
54 for lib_path in C.library_paths():
/libCEED/interface/
H A Dceed-tensor.c94 int CeedTensorContractApply(CeedTensorContract contract, CeedInt A, CeedInt B, CeedInt C, CeedInt J… in CeedTensorContractApply() argument
96 CeedCall(contract->Apply(contract, A, B, C, J, t, t_mode, add, u, v)); in CeedTensorContractApply()
124 int CeedTensorContractStridedApply(CeedTensorContract contract, CeedInt A, CeedInt B, CeedInt C, Ce… in CeedTensorContractStridedApply() argument
128 … CeedCall(contract->Apply(contract, A, J, C, B, t + d * B * J, t_mode, add, u + d * A * J * C, v)); in CeedTensorContractStridedApply()
132 … CeedCall(contract->Apply(contract, A, B, C, J, t + d * B * J, t_mode, add, u, v + d * A * J * C)); in CeedTensorContractStridedApply()
/libCEED/examples/solids/
H A Dindex.md16 …in tensor, respectively) defined in the initial configuration, and $\mathsf C$ is a linearized con…
22 {\overbrace{\bm S = \mathsf C \bm E}^{\text{St. Venant-Kirchoff}}} \\
27 {\underbrace{\bm \sigma = \mathsf C \bm \epsilon}_\text{Linear Elastic}}
120 \bm{\sigma} = \mathsf{C} \!:\! \bm{\epsilon}.
124 Hence, the fourth order elasticity tensor $\mathsf C$ (also known as elastic moduli tensor or mater…
127 \mathsf C = \begin{pmatrix}
137 …sible limit $\nu \to \frac 1 2$ causes $\lambda \to \infty$, and thus $\mathsf C$ becomes singular.
256 \bm C = \bm F^T \bm F
262 \bm E = \frac 1 2 (\bm C - \bm I_3) = \frac 1 2 \Big( \nabla_X \bm u + (\nabla_X \bm u)^T + (\nabla…
271 It is common in the literature for invariants to be taken from $\bm C = \bm I_3 + 2 \bm E$ instead …
[all …]
/libCEED/examples/nek/boxes/
H A Db1e.rea165 C Default
166 C Default
167 C Default
168 C Default
169 C Default
170 C Default
171 C Default
174 C
175 C
176 C
[all …]
/libCEED/examples/solids/qfunctions/
H A Dfinite-strain-mooney-rivlin.h120 const CeedScalar C[3][3] = { in commonFSMR() local
126 Cwork[0] = C[0][0]; in commonFSMR()
127 Cwork[1] = C[1][1]; in commonFSMR()
128 Cwork[2] = C[2][2]; in commonFSMR()
129 Cwork[3] = C[1][2]; in commonFSMR()
130 Cwork[4] = C[0][2]; in commonFSMR()
131 Cwork[5] = C[0][1]; in commonFSMR()
134 const CeedScalar I_1 = C[0][0] + C[1][1] + C[2][2]; in commonFSMR()
140 computeMatinvSym(C, detC, Cinvwork); in commonFSMR()
332 const CeedScalar C[3][3] = { in ElasFSJacobian_MR() local
[all …]
/libCEED/julia/LibCEED.jl/docs/src/
H A DC.md1 # Low-level C interface
3 The low-level interface (provided in the `LibCEED.C` module) is in one-to-one
4 correspondence with the C libCEED iterface, and is automatically generated (with
/libCEED/tests/
H A Dt580-operator.h15 CeedScalar C[2][2]) { in AlphaMatTransposeMatMult2x2()
18 C[j][k] = 0; in AlphaMatTransposeMatMult2x2()
20 C[j][k] += alpha * A[m][j] * B[m][k]; in AlphaMatTransposeMatMult2x2()
/libCEED/doc/bib/
H A Dreferences.bib48 …title = {{H}igh-performance operator evaluations with ease of use: lib{C}{E}{E}{D}'s {P}ython …
49 booktitle = {{P}roceedings of the 19th {P}ython in {S}cience {C}onference},
52 …editor = {{M}eghann {A}garwal and {C}hris {C}alloway and {D}illon {N}iederhut and {D}avid {S}hu…

123