xref: /libCEED/rust/libceed-sys/c-src/backends/opt/ceed-opt.h (revision 3d8e882215d238700cdceb37404f76ca7fa24eaa)
1*3d8e8822SJeremy L Thompson // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors.
2*3d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
389c6efa4Sjeremylt //
4*3d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause
589c6efa4Sjeremylt //
6*3d8e8822SJeremy L Thompson // This file is part of CEED:  http://github.com/ceed
789c6efa4Sjeremylt 
83d576824SJeremy L Thompson #ifndef _ceed_opt_h
93d576824SJeremy L Thompson #define _ceed_opt_h
103d576824SJeremy L Thompson 
11ec3da8bcSJed Brown #include <ceed/ceed.h>
12ec3da8bcSJed Brown #include <ceed/backend.h>
133d576824SJeremy L Thompson #include <stdbool.h>
143d576824SJeremy L Thompson #include <stdint.h>
1589c6efa4Sjeremylt 
1689c6efa4Sjeremylt typedef struct {
17d1d35e2fSjeremylt   CeedInt blk_size;
1889c6efa4Sjeremylt } Ceed_Opt;
1989c6efa4Sjeremylt 
2089c6efa4Sjeremylt typedef struct {
21d1d35e2fSjeremylt   CeedScalar *colo_grad_1d;
2289c6efa4Sjeremylt } CeedBasis_Opt;
2389c6efa4Sjeremylt 
2489c6efa4Sjeremylt typedef struct {
250b454692Sjeremylt   bool is_identity_qf, is_identity_restr_op;
26d1d35e2fSjeremylt   CeedElemRestriction *blk_restr; /* Blocked versions of restrictions */
274fc1f125SJeremy L Thompson   CeedVector *e_vecs_full; /* Full E-vectors, inputs followed by outputs */
284fc1f125SJeremy L Thompson   uint64_t *input_states;  /* State counter of inputs */
294fc1f125SJeremy L Thompson   CeedVector *e_vecs_in;   /* Element block input E-vectors  */
304fc1f125SJeremy L Thompson   CeedVector *e_vecs_out;  /* Element block output E-vectors */
314fc1f125SJeremy L Thompson   CeedVector *q_vecs_in;   /* Element block input Q-vectors  */
324fc1f125SJeremy L Thompson   CeedVector *q_vecs_out;  /* Element block output Q-vectors */
334fc1f125SJeremy L Thompson   CeedInt    num_inputs,num_outputs;
344fc1f125SJeremy L Thompson   CeedInt    num_active_in, num_active_out;
35bb219a0fSJeremy L Thompson   CeedVector *qf_active_in;
364fc1f125SJeremy L Thompson   CeedVector qf_l_vec;
37bb219a0fSJeremy L Thompson   CeedElemRestriction qf_blk_rstr;
3889c6efa4Sjeremylt } CeedOperator_Opt;
3989c6efa4Sjeremylt 
409b2a10adSJeremy L Thompson CEED_INTERN int CeedTensorContractCreate_Opt(CeedBasis basis,
419b2a10adSJeremy L Thompson     CeedTensorContract contract);
4289c6efa4Sjeremylt CEED_INTERN int CeedOperatorCreate_Opt(CeedOperator op);
433d576824SJeremy L Thompson 
443d576824SJeremy L Thompson #endif // _ceed_opt_h
45