xref: /libCEED/backends/opt/ceed-opt.h (revision d4cc18453651bd0f94c1a2e078b2646a92dafdcc)
1*9ba83ac0SJeremy L Thompson // Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
23d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
389c6efa4Sjeremylt //
43d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause
589c6efa4Sjeremylt //
63d8e8822SJeremy L Thompson // This file is part of CEED:  http://github.com/ceed
7509d4af6SJeremy L Thompson #pragma once
83d576824SJeremy L Thompson 
949aac155SJeremy L Thompson #include <ceed.h>
10ec3da8bcSJed Brown #include <ceed/backend.h>
113d576824SJeremy L Thompson #include <stdbool.h>
123d576824SJeremy L Thompson #include <stdint.h>
1389c6efa4Sjeremylt 
1489c6efa4Sjeremylt typedef struct {
15ad70ee2cSJeremy L Thompson   CeedInt block_size;
1689c6efa4Sjeremylt } Ceed_Opt;
1789c6efa4Sjeremylt 
1889c6efa4Sjeremylt typedef struct {
19d1d35e2fSjeremylt   CeedScalar *colo_grad_1d;
2089c6efa4Sjeremylt } CeedBasis_Opt;
2189c6efa4Sjeremylt 
2289c6efa4Sjeremylt typedef struct {
23edb2538eSJeremy L Thompson   bool                 is_identity_qf, is_identity_rstr_op;
24f8a0df59SJeremy L Thompson   bool                *skip_rstr_in, *skip_rstr_out, *apply_add_basis_out;
25edb2538eSJeremy L Thompson   CeedElemRestriction *block_rstr;   /* Blocked versions of restrictions */
264fc1f125SJeremy L Thompson   CeedVector          *e_vecs_full;  /* Full E-vectors, inputs followed by outputs */
274fc1f125SJeremy L Thompson   uint64_t            *input_states; /* State counter of inputs */
284fc1f125SJeremy L Thompson   CeedVector          *e_vecs_in;    /* Element block input E-vectors  */
294fc1f125SJeremy L Thompson   CeedVector          *e_vecs_out;   /* Element block output E-vectors */
304fc1f125SJeremy L Thompson   CeedVector          *q_vecs_in;    /* Element block input Q-vectors  */
314fc1f125SJeremy L Thompson   CeedVector          *q_vecs_out;   /* Element block output Q-vectors */
324fc1f125SJeremy L Thompson   CeedInt              num_inputs, num_outputs;
33ff8551c5SJeremy L Thompson   CeedInt              qf_size_in, qf_size_out;
344fc1f125SJeremy L Thompson   CeedVector           qf_l_vec;
35ad70ee2cSJeremy L Thompson   CeedElemRestriction  qf_block_rstr;
3689c6efa4Sjeremylt } CeedOperator_Opt;
3789c6efa4Sjeremylt 
38a71faab1SSebastian Grimberg CEED_INTERN int CeedTensorContractCreate_Opt(CeedTensorContract contract);
394548da4eSSebastian Grimberg 
4089c6efa4Sjeremylt CEED_INTERN int CeedOperatorCreate_Opt(CeedOperator op);
41