star-gf

Compute Gebhart factors
git clone git://git.meso-star.fr/star-gf.git
Log | Files | Refs | README | LICENSE

sgf_device_c.h (1810B)


      1 /* Copyright (C) 2021, 2024 |Meso|Star> (contact@meso-star.com)
      2  * Copyright (C) 2015-2018 EDF S.A., France (syrthes-support@edf.fr)
      3  *
      4  * This program is free software: you can redistribute it and/or modify
      5  * it under the terms of the GNU General Public License as published by
      6  * the Free Software Foundation, either version 3 of the License, or
      7  * (at your option) any later version.
      8  *
      9  * This program is distributed in the hope that it will be useful,
     10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     12  * GNU General Public License for more details.
     13  *
     14  * You should have received a copy of the GNU General Public License
     15  * along with this program. If not, see <http://www.gnu.org/licenses/>. */
     16 
     17 #ifndef SGF_DEVICE_C_H
     18 #define SGF_DEVICE_C_H
     19 
     20 #include <rsys/ref_count.h>
     21 
     22 /* Fix GCC warnings */
     23 #ifdef COMPILER_GCC
     24   #undef FUNC_NAME
     25   #define FUNC_NAME (__extension__ __FUNCTION__)
     26 #endif
     27 
     28 struct logger;
     29 struct mem_allocator;
     30 struct s2d_device;
     31 struct s3d_device;
     32 
     33 struct sgf_device {
     34   int verbose;
     35   struct logger* logger;
     36   struct s2d_device* s2d;
     37   struct s3d_device* s3d;
     38 
     39   struct mem_allocator* allocator;
     40   ref_T ref;
     41 };
     42 
     43 /* Conditionally log a message on the LOG_ERROR stream of the device logger,
     44  * with respect to the device verbose flag */
     45 extern LOCAL_SYM void
     46 log_error
     47   (struct sgf_device* dev,
     48    const char* msg,
     49    ...)
     50 #ifdef COMPILER_GCC
     51   __attribute((format(printf, 2, 3)))
     52 #endif
     53 ;
     54 
     55 /* Conditionally log a message on the LOG_WARNING stream of the device logger,
     56  * with respect to the device verbose flag */
     57 extern LOCAL_SYM void
     58 log_warning
     59   (struct sgf_device* dev,
     60    const char* msg,
     61    ...)
     62 #ifdef COMPILER_GCC
     63   __attribute((format(printf, 2, 3)))
     64 #endif
     65 ;
     66 
     67 
     68 #endif /* SGF_DEVICE_C_H */
     69