xref: /libCEED/rust/libceed-sys/c-src/backends/opt/ceed-opt.h (revision 4fc1f125220093941aecd24c06b30795af25d383)
189c6efa4Sjeremylt // Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC.
289c6efa4Sjeremylt // Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707.
389c6efa4Sjeremylt // All Rights reserved. See files LICENSE and NOTICE for details.
489c6efa4Sjeremylt //
589c6efa4Sjeremylt // This file is part of CEED, a collection of benchmarks, miniapps, software
689c6efa4Sjeremylt // libraries and APIs for efficient high-order finite element and spectral
789c6efa4Sjeremylt // element discretizations for exascale applications. For more information and
889c6efa4Sjeremylt // source code availability see http://github.com/ceed.
989c6efa4Sjeremylt //
1089c6efa4Sjeremylt // The CEED research is supported by the Exascale Computing Project 17-SC-20-SC,
1189c6efa4Sjeremylt // a collaborative effort of two U.S. Department of Energy organizations (Office
1289c6efa4Sjeremylt // of Science and the National Nuclear Security Administration) responsible for
1389c6efa4Sjeremylt // the planning and preparation of a capable exascale ecosystem, including
1489c6efa4Sjeremylt // software, applications, hardware, advanced system engineering and early
1589c6efa4Sjeremylt // testbed platforms, in support of the nation's exascale computing imperative.
1689c6efa4Sjeremylt 
173d576824SJeremy L Thompson #ifndef _ceed_opt_h
183d576824SJeremy L Thompson #define _ceed_opt_h
193d576824SJeremy L Thompson 
20ec3da8bcSJed Brown #include <ceed/ceed.h>
21ec3da8bcSJed Brown #include <ceed/backend.h>
223d576824SJeremy L Thompson #include <stdbool.h>
233d576824SJeremy L Thompson #include <stdint.h>
2489c6efa4Sjeremylt 
2589c6efa4Sjeremylt typedef struct {
26d1d35e2fSjeremylt   CeedInt blk_size;
2789c6efa4Sjeremylt } Ceed_Opt;
2889c6efa4Sjeremylt 
2989c6efa4Sjeremylt typedef struct {
30d1d35e2fSjeremylt   CeedScalar *colo_grad_1d;
3189c6efa4Sjeremylt } CeedBasis_Opt;
3289c6efa4Sjeremylt 
3389c6efa4Sjeremylt typedef struct {
340b454692Sjeremylt   bool is_identity_qf, is_identity_restr_op;
35d1d35e2fSjeremylt   CeedElemRestriction *blk_restr; /* Blocked versions of restrictions */
36*4fc1f125SJeremy L Thompson   CeedVector *e_vecs_full; /* Full E-vectors, inputs followed by outputs */
37*4fc1f125SJeremy L Thompson   uint64_t *input_states;  /* State counter of inputs */
38*4fc1f125SJeremy L Thompson   CeedVector *e_vecs_in;   /* Element block input E-vectors  */
39*4fc1f125SJeremy L Thompson   CeedVector *e_vecs_out;  /* Element block output E-vectors */
40*4fc1f125SJeremy L Thompson   CeedVector *q_vecs_in;   /* Element block input Q-vectors  */
41*4fc1f125SJeremy L Thompson   CeedVector *q_vecs_out;  /* Element block output Q-vectors */
42*4fc1f125SJeremy L Thompson   CeedInt    num_inputs,num_outputs;
43*4fc1f125SJeremy L Thompson   CeedInt    num_active_in, num_active_out;
44bb219a0fSJeremy L Thompson   CeedVector *qf_active_in;
45*4fc1f125SJeremy L Thompson   CeedVector qf_l_vec;
46bb219a0fSJeremy L Thompson   CeedElemRestriction qf_blk_rstr;
4789c6efa4Sjeremylt } CeedOperator_Opt;
4889c6efa4Sjeremylt 
499b2a10adSJeremy L Thompson CEED_INTERN int CeedTensorContractCreate_Opt(CeedBasis basis,
509b2a10adSJeremy L Thompson     CeedTensorContract contract);
5189c6efa4Sjeremylt CEED_INTERN int CeedOperatorCreate_Opt(CeedOperator op);
523d576824SJeremy L Thompson 
533d576824SJeremy L Thompson #endif // _ceed_opt_h
54