Home
last modified time | relevance | path

Searched refs:c (Results 1 – 25 of 103) sorted by relevance

12345

/libCEED/examples/petsc/
H A DMakefile33 utils.c := $(sort $(wildcard $(SRCDIR)/*.c))
34 utils.o = $(utils.c:%.c=$(OBJDIR)/%.o)
38 area.c := area.c
39 area.o = $(area.c:%.c=$(OBJDIR)/%.o)
43 bps.c := bps.c
44 bps.o = $(bps.c:%.c=$(OBJDIR)/%.o)
48 bpsraw.c := bpsraw.c
49 bpsraw.o = $(bpsraw.c:%.c=$(OBJDIR)/%.o)
53 bpssphere.c := bpssphere.c
54 bpssphere.o = $(bpssphere.c:%.c=$(OBJDIR)/%.o)
[all …]
/libCEED/tests/
H A Dt539-operator.h27 for (CeedInt c = 0; c < num_comp_0; c++) { in apply() local
29 v_0[i + Q * c] = qd_mass[i] * (c + 1) * u_0[i + Q * c]; in apply()
31 dv_0[i + Q * (0 * num_comp_0 + c)] = in apply()
32 …qd_diff[i + Q * 0] * (c + 1) * du_0[i + Q * (0 * num_comp_0 + c)] + qd_diff[i + Q * 2] * du_0[i + … in apply()
33 dv_0[i + Q * (1 * num_comp_0 + c)] = in apply()
34 …qd_diff[i + Q * 2] * (c + 1) * du_0[i + Q * (0 * num_comp_0 + c)] + qd_diff[i + Q * 1] * du_0[i + … in apply()
H A Dt414-qfunction.c38 for (CeedInt c = 0; c < num_comp; c++) { in main() local
40 u_array[i + c * num_qpts] = c + 1; in main()
75 for (CeedInt c = 0; c < num_comp; c++) { in main() local
77 for (CeedInt i = 0; i < num_qpts; i++) sum += v_array[i + c * num_qpts]; in main()
78 if (fabs(sum - (c + 1)) > 10 * CEED_EPSILON) { in main()
80 …%" CeedInt_FMT "D volume error in component %" CeedInt_FMT ": %f != %f\n", dim, c, sum, (c + 1.0)); in main()
H A Dt415-qfunction.c38 for (CeedInt c = 0; c < num_comp; c++) { in main() local
41 du_array[i + (g * num_comp + c) * num_qpts] = c + 1; in main()
79 for (CeedInt c = 0; c < num_comp; c++) { in main() local
82 for (CeedInt g = 0; g < dim; g++) sum += v_array[i + (g * num_comp + c) * num_qpts]; in main()
84 if (fabs(sum - dim * (c + 1)) > 10 * CEED_EPSILON) { in main()
86 …dInt_FMT "D volume error in component %" CeedInt_FMT ": %f != %f\n", dim, c, sum, dim * (c + 1.0)); in main()
H A Dt355-basis.c10 static CeedScalar Eval(CeedScalar x, CeedInt n, const CeedScalar *c) { in Eval() argument
11 CeedScalar y = c[n - 1]; in Eval()
12 for (CeedInt i = n - 2; i >= 0; i--) y = y * x + c[i]; in Eval()
16 static CeedScalar EvalGrad(CeedScalar x, CeedInt n, const CeedScalar *c) { in EvalGrad() argument
17 CeedScalar y = (n - 1) * c[n - 1]; in EvalGrad()
18 for (CeedInt i = n - 2; i >= 1; i--) y = y * x + i * c[i]; in EvalGrad()
27 const CeedScalar c[4] = {1, 2, 3, 4}; // f = 1 + 2x + 3x^2 + ..., df = 2 + 6x + 12x^2 + ... in main() local
53 for (CeedInt i = 0; i < p; i++) u_array[i] = Eval(x_array[i], ALEN(c), c); in main()
73 CeedScalar dfx = EvalGrad(x_array[i], ALEN(c), c); in main()
H A Dt352-basis.c55 for (CeedInt c = 0; c < num_comp; c++) u_array[i + c * p_dim] = Eval(dim, c, coord); in main() local
79 for (CeedInt c = 0; c < num_comp; c++) { in main() local
80 CeedScalar fx = Eval(dim, c, coord); in main()
81 if (fabs(v_array[c * num_points + i] - fx) > 1E-4) { in main()
83 …printf("[%" CeedInt_FMT ", %" CeedInt_FMT "] %f != %f = f(%f", dim, c, v_array[c + i * num_comp], … in main()
H A Dt596-operator.h26 for (CeedInt c = 0; c < num_comp; c++) v[i + c * Q] = rho[i] * c * u[i + c * Q]; in mass() local
H A Dt568-operator.h49 for (CeedInt c = 0; c < 2; c++) { in diff() local
50 const CeedScalar du0 = du[i + c * Q + 2 * Q * 0]; in diff()
51 const CeedScalar du1 = du[i + c * Q + 2 * Q * 1]; in diff()
52 dv[i + c * Q + 2 * Q * 0] = qd[i + Q * 0] * du0 + qd[i + Q * 2] * du1; in diff()
53 dv[i + c * Q + 2 * Q * 1] = qd[i + Q * 2] * du0 + qd[i + Q * 1] * du1; in diff()
H A Dt597-operator.h49 for (CeedInt c = 0; c < num_comp; c++) { in diff() local
50 const CeedScalar du0 = du[i + Q * (2 * c + 0)]; in diff()
51 const CeedScalar du1 = du[i + Q * (2 * c + 1)]; in diff()
53 dv[i + Q * (2 * c + 0)] = qd[i + Q * 0] * du0 + qd[i + Q * 2] * du1; in diff()
54 dv[i + Q * (2 * c + 1)] = qd[i + Q * 2] * du0 + qd[i + Q * 1] * du1; in diff()
H A Dt350-basis.c10 static CeedScalar Eval(CeedScalar x, CeedInt n, const CeedScalar *c) { in Eval() argument
11 CeedScalar y = c[n - 1]; in Eval()
12 for (CeedInt i = n - 2; i >= 0; i--) y = y * x + c[i]; in Eval()
21 const CeedScalar c[4] = {1, 2, 3, 4}; // 1 + 2x + 3x^2 + ... in main() local
47 for (CeedInt i = 0; i < p; i++) u_array[i] = Eval(x_array[i], ALEN(c), c); in main()
67 CeedScalar fx = Eval(x_array[i], ALEN(c), c); in main()
/libCEED/
H A DMakefile147 CXXFLAGS.gcc := $(if $(STATIC),,-fPIC) -std=c++11 -Wall -Wextra -Wno-unused-parameter -M…
151 CXXFLAGS.XL := $(if $(STATIC),,-qpic) -std=c++11 -MMD
161 cc_check_flag = $(shell $(CC) -E -Werror $(1) -x c /dev/null > /dev/null 2>&1 && echo 1)
188 SYCLFLAGS ?= $(SYCL_FLAG) -fPIC -std=c++17 $(filter-out -std=c++11,$(CXXFLAGS)) $(filter-out $(OMP_…
289c := $(filter-out interface/ceed-cuda.c interface/ceed-hip.c interface/ceed-jit-source-root-$(if $…
290 gallery.c := $(wildcard gallery/*/ceed*.c)
291 libceed.c += $(gallery.c)
295 ref.c := $(sort $(wildcard backends/ref/*.c))
296 blocked.c := $(sort $(wildcard backends/blocked/*.c))
297 ceedmemcheck.c := $(sort $(wildcard backends/memcheck/*.c))
[all …]
/libCEED/rust/libceed-sys/c-src/
H A DMakefile147 CXXFLAGS.gcc := $(if $(STATIC),,-fPIC) -std=c++11 -Wall -Wextra -Wno-unused-parameter -M…
151 CXXFLAGS.XL := $(if $(STATIC),,-qpic) -std=c++11 -MMD
161 cc_check_flag = $(shell $(CC) -E -Werror $(1) -x c /dev/null > /dev/null 2>&1 && echo 1)
188 SYCLFLAGS ?= $(SYCL_FLAG) -fPIC -std=c++17 $(filter-out -std=c++11,$(CXXFLAGS)) $(filter-out $(OMP_…
289c := $(filter-out interface/ceed-cuda.c interface/ceed-hip.c interface/ceed-jit-source-root-$(if $…
290 gallery.c := $(wildcard gallery/*/ceed*.c)
291 libceed.c += $(gallery.c)
295 ref.c := $(sort $(wildcard backends/ref/*.c))
296 blocked.c := $(sort $(wildcard backends/blocked/*.c))
297 ceedmemcheck.c := $(sort $(wildcard backends/memcheck/*.c))
[all …]
/libCEED/examples/ceed/
H A DMakefile15 EXAMPLES.c = $(wildcard ex*.c)
16 EXAMPLES = $(EXAMPLES.c:%.c=%)
19 .SUFFIXES: .c
25 %: %.c
28 %: %.c
29 $(LINK.c) $(CEED_FLAGS) $(CEED_LDFLAGS) $< -o $@ $(CEED_LIBS)
/libCEED/julia/LibCEED.jl/src/
H A DCeed.jl64 destroy(c::Ceed) = C.CeedDestroy(c.ref) # COV_EXCL_LINE
65 Base.getindex(c::Ceed) = c.ref[]
67 Base.show(io::IO, ::MIME"text/plain", c::Ceed) = ceed_show(io, c, C.CeedView)
70 getresource(c::Ceed)
74 function getresource(c::Ceed)
76 C.CeedGetResource(c[], res)
81 isdeterministic(c::Ceed)
86 function isdeterministic(c::Ceed)
88 C.CeedIsDeterministic(c[], isdet)
93 get_preferred_memtype(c::Ceed)
[all …]
/libCEED/examples/nek/
H A DSIZE.in1 C Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
30 c
32 c
39 c
40 c parameter (lpelv=lelv,lpelt=lelt,lpert=3) ! perturbation
41 c parameter (lpx1=lx1,lpy1=ly1,lpz1=lz1) ! array sizes
42 c parameter (lpx2=lx2,lpy2=ly2,lpz2=lz2)
43 c
47 c
48 c
[all …]
/libCEED/backends/avx/
H A Dceed-avx-tensor.c21 #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
55 for (CeedInt c = 0; c < (C / CC) * CC; c += CC) { 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()
77 for (CeedInt c = 0; c < (C / CC) * CC; c += CC) { in CeedTensorContract_Avx_Blocked() local
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()
[all …]
/libCEED/examples/rust-qfunctions/
H A DMakefile15 EXAMPLES.c = $(wildcard ex*.c)
16 EXAMPLES = $(EXAMPLES.c:%.c=%)
19 .SUFFIXES: .c
25 %: %.c
28 ex1-volume: ex1-volume.c
30 …$(LINK.c) $(CEED_FLAGS) $(CEED_LDFLAGS) $(abspath $<) -o $@ $(CEED_LIBS) -L$(CEED_DIR)/examples/ru…
/libCEED/julia/LibCEED.jl/test/
H A Druntests.jl41 c = Ceed(res)
42 @test isdeterministic(c)
43 @test getresource(c) == res
44 @test !iscuda(c)
45 @test get_preferred_memtype(c) == MEM_HOST
46 @test_throws LibCEED.CeedError create_interior_qfunction(c, "")
47 @test showstr(c) == """
54 c = Ceed()
56 ctx = Context(c, data)
65 c = Ceed()
[all …]
H A Drundevtests.jl13 c = Ceed()
15 c,
22 b = create_tensor_h1_lagrange_basis(c, 3, 1, 3, 3, GAUSS_LOBATTO)
25 r = create_elem_restriction(c, 1, n, 1, 1, n, offsets)
27 c;
36 v1 = CeedVector(c, v)
37 v2 = CeedVector(c, n)
39 comp_op = create_composite_operator(c, [op])
/libCEED/include/ceed/jit-source/gallery/
H A Dceed-vectorpoisson3dapply.h38 for (CeedInt c = 0; c < num_comp; c++) in Vector3Poisson3DApply() local
39 …vg[j][c][i] = (ug[0][c][i] * dXdxdXdxT[0][j] + ug[1][c][i] * dXdxdXdxT[1][j] + ug[2][c][i] * dXdxd… in Vector3Poisson3DApply()
H A Dceed-vectorpoisson2dapply.h36 …for (CeedInt c = 0; c < num_comp; c++) vg[j][c][i] = (ug[0][c][i] * dXdxdXdxT[0][j] + ug[1][c][i] … in Vector3Poisson2DApply() local
H A Dceed-vectormassapply.h24 for (CeedInt c = 0; c < num_comp; c++) { in Vector3MassApply() local
25 v[c][i] = u[c][i] * q_data[i]; in Vector3MassApply()
H A Dceed-vectorpoisson1dapply.h24 for (CeedInt c = 0; c < num_comp; c++) { in Vector3Poisson1DApply() local
25 vg[c][i] = ug[c][i] * q_data[i]; in Vector3Poisson1DApply()
/libCEED/include/ceed/jit-source/cuda/
H A Dcuda-ref-basis-tensor-at-points.h85 const CeedInt c = k % post; in InterpAtPoints() local
90 …t b = 0; b < P; b++) v_k += s_chebyshev_interp_1d[j * BASIS_P_1D + b] * in[(a * P + b) * post + c]; in InterpAtPoints()
112 for (CeedInt c = 0; c < post; c++) { 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()
179 for (CeedInt c = 0; c < post; c++) { in InterpTransposeAtPoints() local
181 …; j++) atomicAdd(&out[(a * Q + (j + p) % Q) * post + c], chebyshev_x[(j + p) % Q] * in[a * post + 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()
204 const CeedInt c = k % post; in InterpTransposeAtPoints() local
209 …t b = 0; b < Q; b++) v_k += s_chebyshev_interp_1d[j + b * BASIS_P_1D] * in[(a * Q + b) * post + c]; in InterpTransposeAtPoints()
[all …]
/libCEED/include/ceed/jit-source/hip/
H A Dhip-ref-basis-tensor-at-points.h85 const CeedInt c = k % post; in InterpAtPoints() local
90 …t b = 0; b < P; b++) v_k += s_chebyshev_interp_1d[j * BASIS_P_1D + b] * in[(a * P + b) * post + c]; in InterpAtPoints()
112 for (CeedInt c = 0; c < post; c++) { 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()
179 for (CeedInt c = 0; c < post; c++) { in InterpTransposeAtPoints() local
181 …; j++) atomicAdd(&out[(a * Q + (j + p) % Q) * post + c], chebyshev_x[(j + p) % Q] * in[a * post + 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()
204 const CeedInt c = k % post; in InterpTransposeAtPoints() local
209 …t b = 0; b < Q; b++) v_k += s_chebyshev_interp_1d[j + b * BASIS_P_1D] * in[(a * Q + b) * post + c]; in InterpTransposeAtPoints()
[all …]

12345