1*62b7942eSJames Wright // Copyright (c) 2017-2023, Lawrence Livermore National Security, LLC and other CEED contributors. 2*62b7942eSJames Wright // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3*62b7942eSJames Wright // 4*62b7942eSJames Wright // SPDX-License-Identifier: BSD-2-Clause 5*62b7942eSJames Wright // 6*62b7942eSJames Wright // This file is part of CEED: http://github.com/ceed 7*62b7942eSJames Wright 8*62b7942eSJames Wright /// @file 9*62b7942eSJames Wright /// Structs and helper functions for data-driven subgrid-stress modeling 10*62b7942eSJames Wright 11*62b7942eSJames Wright #ifndef sgs_dd_model_h 12*62b7942eSJames Wright #define sgs_dd_model_h 13*62b7942eSJames Wright 14*62b7942eSJames Wright #include <ceed.h> 15*62b7942eSJames Wright 16*62b7942eSJames Wright typedef struct SGS_DD_ModelContext_ *SGS_DDModelContext; 17*62b7942eSJames Wright struct SGS_DD_ModelContext_ { 18*62b7942eSJames Wright CeedInt num_inputs, num_outputs; 19*62b7942eSJames Wright CeedInt num_layers; 20*62b7942eSJames Wright CeedInt num_neurons; 21*62b7942eSJames Wright CeedScalar alpha; 22*62b7942eSJames Wright 23*62b7942eSJames Wright struct { 24*62b7942eSJames Wright size_t bias1, bias2; 25*62b7942eSJames Wright size_t weight1, weight2; 26*62b7942eSJames Wright size_t out_scaling; 27*62b7942eSJames Wright } offsets; 28*62b7942eSJames Wright size_t total_bytes; 29*62b7942eSJames Wright CeedScalar data[1]; 30*62b7942eSJames Wright }; 31*62b7942eSJames Wright 32*62b7942eSJames Wright #endif // sgs_dd_model_h 33