MEX files: homogeneize include guards

Also ensure that guards are not reserved identifiers (i.e. starting with an
underscore).
mr#2177
Sébastien Villemot 2023-12-13 16:50:28 +01:00
parent 7ba1fc1c63
commit 594facdb03
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
77 changed files with 222 additions and 192 deletions

View File

@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _BASIC_SYMBOL_TABLE_HH
#define _BASIC_SYMBOL_TABLE_HH
#ifndef BASIC_SYMBOL_TABLE_HH
#define BASIC_SYMBOL_TABLE_HH
#include <map>
#include <string>
@ -44,4 +44,4 @@ private:
map<string, pair<SymbolType, int>> name_to_id_and_type;
};
#endif // _BASIC_SYMBOL_TABLE_HH
#endif

View File

@ -1,5 +1,5 @@
/*
* Copyright © 2007-2022 Dynare Team
* Copyright © 2007-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _ERROR_HANDLING_HH
#define _ERROR_HANDLING_HH
#ifndef ERROR_HANDLING_HH
#define ERROR_HANDLING_HH
#include <cmath>
#include <sstream>
@ -111,4 +111,4 @@ test_mxMalloc(void* z, int line, const string& file, const string& func, int amo
extern "C" bool utIsInterruptPending();
#endif
#endif // _ERROR_HANDLING_HH
#endif

View File

@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _EVALUATE_HH
#define _EVALUATE_HH
#ifndef EVALUATE_HH
#define EVALUATE_HH
#include <deque>
#include <filesystem>
@ -170,4 +170,4 @@ public:
}
};
#endif // _EVALUATE_HH
#endif

View File

@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _INTERPRETER_HH
#define _INTERPRETER_HH
#ifndef INTERPRETER_HH
#define INTERPRETER_HH
#include <cstddef>
#include <fstream>
@ -287,4 +287,4 @@ public:
}
};
#endif // _INTERPRETER_HH
#endif

View File

@ -1,5 +1,5 @@
/*
* Copyright © 2007-2021 Dynare Team
* Copyright © 2007-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _MEM_MNGR_HH
#define _MEM_MNGR_HH
#ifndef MEM_MNGR_HH
#define MEM_MNGR_HH
#include <fstream>
#include <string>
@ -61,4 +61,4 @@ private:
string filename_mem;
};
#endif // _MEM_MNGR_HH
#endif

View File

@ -26,8 +26,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _DYNBLAS_H
#define _DYNBLAS_H
#ifndef DYNBLAS_H
#define DYNBLAS_H
#if defined(MATLAB_MEX_FILE) && __SIZEOF_POINTER__ == 8
# ifdef __cplusplus
@ -134,4 +134,4 @@ extern "C"
} /* extern "C" */
#endif
#endif /* _DYNBLAS_H */
#endif

View File

@ -26,8 +26,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _DYNLAPACK_H
#define _DYNLAPACK_H
#ifndef DYNLAPACK_H
#define DYNLAPACK_H
#if defined(MATLAB_MEX_FILE) && __SIZEOF_POINTER__ == 8
# ifdef __cplusplus
@ -231,4 +231,4 @@ extern "C"
} /* extern "C" */
#endif
#endif /* _DYNLAPACK_H */
#endif

View File

@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _DYNMEX_H
#define _DYNMEX_H
#ifndef DYNMEX_H
#define DYNMEX_H
#if !defined(MATLAB_MEX_FILE) && !defined(OCTAVE_MEX_FILE)
# error You must define either MATLAB_MEX_FILE or OCTAVE_MEX_FILE

View File

@ -21,8 +21,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _DYNUMFPACK_H
#define _DYNUMFPACK_H
#ifndef DYNUMFPACK_H
#define DYNUMFPACK_H
#ifdef OCTAVE_MEX_FILE
# ifdef HAVE_SUITESPARSE_UMFPACK_H
@ -108,4 +108,4 @@ typedef long SuiteSparse_long;
# endif
#endif // OCTAVE_MEX_FILE
#endif /* DYNUMFPACK */
#endif

View File

@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef APPROXIMATION_WELFARE_H
#define APPROXIMATION_WELFARE_H
#ifndef APPROXIMATION_WELFARE_HH
#define APPROXIMATION_WELFARE_HH
#include "journal.hh"
#include "k_ord_objective.hh"

View File

@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef K_ORD_OBJECTIVE_H
#define K_ORD_OBJECTIVE_H
#ifndef K_ORD_OBJECTIVE_HH
#define K_ORD_OBJECTIVE_HH
#include "k_ord_dynare.hh"
#include "objective_abstract_class.hh"

View File

@ -1,5 +1,5 @@
/*
* Copyright © 2021 Dynare Team
* Copyright © 2021-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _OBJECTIVEAC_HH
#define _OBJECTIVEAC_HH
#ifndef OBJECTIVE_ABSTRACT_CLASS_HH
#define OBJECTIVE_ABSTRACT_CLASS_HH
#include <vector>

View File

@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _OBJECTIVE_M_HH
#define _OBJECTIVE_M_HH
#ifndef OBJECTIVE_M_HH
#define OBJECTIVE_M_HH
#include "objective_abstract_class.hh"

View File

@ -1,5 +1,5 @@
/*
* Copyright © 2010-2019 Dynare Team
* Copyright © 2010-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _DYNAMICMODELAC_HH
#define _DYNAMICMODELAC_HH
#ifndef DYNAMIC_ABSTRACT_CLASS_HH
#define DYNAMIC_ABSTRACT_CLASS_HH
#include <vector>

View File

@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _DYNAMIC_DLL_HH
#define _DYNAMIC_DLL_HH
#ifndef DYNAMIC_DLL_HH
#define DYNAMIC_DLL_HH
#if defined(_WIN32) || defined(__CYGWIN32__)
# ifndef NOMINMAX

View File

@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _DYNAMIC_M_HH
#define _DYNAMIC_M_HH
#ifndef DYNAMIC_M_HH
#define DYNAMIC_M_HH
#include "dynamic_abstract_class.hh"

View File

@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef K_ORD_DYNARE3_H
#define K_ORD_DYNARE3_H
#ifndef K_ORD_DYNARE_HH
#define K_ORD_DYNARE_HH
#include <memory>
#include <string>

View File

@ -61,8 +61,8 @@
calculate also its unfolded versions, to be available for simulations
and so on. */
#ifndef APPROXIMATION_H
#define APPROXIMATION_H
#ifndef APPROXIMATION_HH
#define APPROXIMATION_HH
#include "decision_rule.hh"
#include "dynamic_model.hh"

View File

@ -32,8 +32,8 @@
DRFixPoint allows for calculation of the fix point of a given decision
rule. */
#ifndef DECISION_RULE_H
#define DECISION_RULE_H
#ifndef DECISION_RULE_HH
#define DECISION_RULE_HH
#include "kord_exception.hh"
#include "korder.hh"

View File

@ -27,8 +27,8 @@
The interface is defined via pure virtual class DynamicModel. */
#ifndef DYNAMIC_MODEL_H
#define DYNAMIC_MODEL_H
#ifndef DYNAMIC_MODEL_HH
#define DYNAMIC_MODEL_HH
#include "sparse_tensor.hh"
#include "t_container.hh"

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2005 Ondra Kamenik
* Copyright © 2019 Dynare Team
* Copyright © 2019-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -29,8 +29,8 @@
where s is a general symmetry of dimension k and z is a stack of
functions. */
#ifndef FAA_DI_BRUNO_H
#define FAA_DI_BRUNO_H
#ifndef FAA_DI_BRUNO_HH
#define FAA_DI_BRUNO_HH
#include "gs_tensor.hh"
#include "journal.hh"

View File

@ -20,8 +20,8 @@
// First order at deterministic steady state
#ifndef FIRST_ORDER_H
#define FIRST_ORDER_H
#ifndef FIRST_ORDER_HH
#define FIRST_ORDER_HH
#include "korder.hh"

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004 Ondra Kamenik
* Copyright © 2019-2020 Dynare Team
* Copyright © 2019-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -20,8 +20,8 @@
// Resource usage journal
#ifndef JOURNAL_H
#define JOURNAL_H
#ifndef JOURNAL_HH
#define JOURNAL_HH
#include "int_sequence.hh"

View File

@ -22,23 +22,23 @@
/* This is a simple code defining an exception and two convenience macros. */
#ifndef KORD_EXCEPTION_HH
#define KORD_EXCEPTION_HH
#include <iostream>
#include <string>
#ifndef KORD_EXCEPTION_H
# define KORD_EXCEPTION_H
#define KORD_RAISE(mes) throw KordException(__FILE__, __LINE__, mes);
# define KORD_RAISE(mes) throw KordException(__FILE__, __LINE__, mes);
#define KORD_RAISE_IF(expr, mes) \
if (expr) \
throw KordException(__FILE__, __LINE__, mes);
# define KORD_RAISE_IF(expr, mes) \
if (expr) \
throw KordException(__FILE__, __LINE__, mes);
#define KORD_RAISE_X(mes, c) throw KordException(__FILE__, __LINE__, mes, c);
# define KORD_RAISE_X(mes, c) throw KordException(__FILE__, __LINE__, mes, c);
# define KORD_RAISE_IF_X(expr, mes, c) \
if (expr) \
throw KordException(__FILE__, __LINE__, mes, c);
#define KORD_RAISE_IF_X(expr, mes, c) \
if (expr) \
throw KordException(__FILE__, __LINE__, mes, c);
class KordException
{

View File

@ -38,8 +38,8 @@
PartitionY, MatrixA, MatrixS and MatrixB.
*/
#ifndef KORDER_H
#define KORDER_H
#ifndef KORDER_HH
#define KORDER_HH
#include "faa_di_bruno.hh"
#include "fs_tensor.hh"

View File

@ -38,6 +38,9 @@
h as an extrapolation based on an approximation to g at lower σ.
*/
#ifndef KORDER_STOCH_HH
#define KORDER_STOCH_HH
#include <memory>
#include "faa_di_bruno.hh"
@ -573,3 +576,5 @@ KOrderStoch::performStep(int order)
Gstack<t>().multAndAdd(1, h<t>(), *G_sym_ptr);
}
}
#endif

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef BLOCK_DIAGONAL_H
#define BLOCK_DIAGONAL_H
#ifndef BLOCK_DIAGONAL_HH
#define BLOCK_DIAGONAL_HH
#include <memory>
#include <vector>
@ -70,4 +70,4 @@ private:
Vector& work) const;
};
#endif /* BLOCK_DIAGONAL_H */
#endif

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef GENERAL_MATRIX_H
#define GENERAL_MATRIX_H
#ifndef GENERAL_MATRIX_HH
#define GENERAL_MATRIX_HH
#include "SylvException.hh"
#include "Vector.hh"
@ -611,4 +611,4 @@ private:
void construct(const GeneralMatrix& A);
};
#endif /* GENERAL_MATRIX_H */
#endif

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef GENERAL_SYLVESTER_H
#define GENERAL_SYLVESTER_H
#ifndef GENERAL_SYLVESTER_HH
#define GENERAL_SYLVESTER_HH
#include "SimilarityDecomp.hh"
#include "SylvMatrix.hh"
@ -87,4 +87,4 @@ private:
void init();
};
#endif /* GENERAL_SYLVESTER_H */
#endif

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004-2011 Ondra Kamenik
* Copyright © 2019 Dynare Team
* Copyright © 2019-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef ITERATIVE_SYLVESTER_H
#define ITERATIVE_SYLVESTER_H
#ifndef ITERATIVE_SYLVESTER_HH
#define ITERATIVE_SYLVESTER_HH
#include "KronVector.hh"
#include "QuasiTriangular.hh"
@ -47,4 +47,4 @@ private:
static double performStep(const QuasiTriangular& k, const QuasiTriangular& f, KronVector& x);
};
#endif /* ITERATIVE_SYLVESTER_H */
#endif

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004-2011 Ondra Kamenik
* Copyright © 2019 Dynare Team
* Copyright © 2019-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef KRON_UTILS_H
#define KRON_UTILS_H
#ifndef KRON_UTILS_HH
#define KRON_UTILS_HH
#include "KronVector.hh"
#include "QuasiTriangular.hh"
@ -38,4 +38,4 @@ public:
static void multKron(const QuasiTriangular& f, const QuasiTriangular& k, KronVector& x);
};
#endif /* KRON_UTILS_H */
#endif

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef KRON_VECTOR_H
#define KRON_VECTOR_H
#ifndef KRON_VECTOR_HH
#define KRON_VECTOR_HH
#include "Vector.hh"
@ -101,4 +101,4 @@ public:
}
};
#endif /* KRON_VECTOR */
#endif

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef QUASI_TRIANGULAR_H
#define QUASI_TRIANGULAR_H
#ifndef QUASI_TRIANGULAR_HH
#define QUASI_TRIANGULAR_HH
#include "KronVector.hh"
#include "SylvMatrix.hh"
@ -472,4 +472,4 @@ private:
void multsVecTrans(Vector& x, const ConstVector& d) const;
};
#endif /* QUASI_TRIANGULAR_H */
#endif

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef QUASI_TRIANGULAR_ZERO_H
#define QUASI_TRIANGULAR_ZERO_H
#ifndef QUASI_TRIANGULAR_ZERO_HH
#define QUASI_TRIANGULAR_ZERO_HH
#include "GeneralMatrix.hh"
#include "QuasiTriangular.hh"
@ -84,4 +84,4 @@ public:
void print() const override;
};
#endif /* QUASI_TRIANGULAR_ZERO_H */
#endif

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef SCHUR_DECOMP_H
#define SCHUR_DECOMP_H
#ifndef SCHUR_DECOMP_HH
#define SCHUR_DECOMP_HH
#include "QuasiTriangular.hh"
#include "SylvMatrix.hh"
@ -80,4 +80,4 @@ public:
}
};
#endif /* SCHUR_DECOMP_H */
#endif

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004-2011 Ondra Kamenik
* Copyright © 2019 Dynare Team
* Copyright © 2019-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -20,8 +20,8 @@
// contains algorithms for eigenvalue reordering
#ifndef SCHUR_DECOMP_EIG_H
#define SCHUR_DECOMP_EIG_H
#ifndef SCHUR_DECOMP_EIG_HH
#define SCHUR_DECOMP_EIG_HH
#include "QuasiTriangular.hh"
#include "SchurDecomp.hh"
@ -44,4 +44,4 @@ protected:
bool tryToSwap(diag_iter& it, diag_iter& itadd);
};
#endif /* SCHUR_DECOMP_EIG_H */
#endif

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef SIMILARITY_DECOMP_H
#define SIMILARITY_DECOMP_H
#ifndef SIMILARITY_DECOMP_HH
#define SIMILARITY_DECOMP_HH
#include "BlockDiagonal.hh"
#include "SylvMatrix.hh"
@ -63,4 +63,4 @@ protected:
void diagonalize(double norm);
};
#endif /* SIMILARITY_DECOMP_H */
#endif

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef SYLV_EXCEPTION_H
#define SYLV_EXCEPTION_H
#ifndef SYLV_EXCEPTION_HH
#define SYLV_EXCEPTION_HH
#include <string>
@ -48,4 +48,4 @@ public:
// define macros:
#define SYLV_MES_EXCEPTION(mes) (SylvExceptionMessage(__FILE__, __LINE__, mes))
#endif /* SYLV_EXCEPTION_H */
#endif

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004-2011 Ondra Kamenik
* Copyright © 2019 Dynare Team
* Copyright © 2019-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef SYLV_MATRIX_H
#define SYLV_MATRIX_H
#ifndef SYLV_MATRIX_HH
#define SYLV_MATRIX_HH
#include "GeneralMatrix.hh"
#include "KronVector.hh"
@ -105,4 +105,4 @@ public:
void setUnit();
};
#endif /* SYLV_MATRIX_H */
#endif

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef SYLV_PARAMS_H
#define SYLV_PARAMS_H
#ifndef SYLV_PARAMS_HH
#define SYLV_PARAMS_HH
#include <ostream>
#include <string>
@ -235,4 +235,4 @@ operator<<(std::ostream& out, SylvParams::solve_method m)
return out;
}
#endif /* SYLV_PARAMS_H */
#endif

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004-2011 Ondra Kamenik
* Copyright © 2019 Dynare Team
* Copyright © 2019-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef SYLVESTER_SOLVER_H
#define SYLVESTER_SOLVER_H
#ifndef SYLVESTER_SOLVER_HH
#define SYLVESTER_SOLVER_HH
#include "KronVector.hh"
#include "QuasiTriangular.hh"
@ -66,4 +66,4 @@ public:
virtual void solve(SylvParams& pars, KronVector& x) const = 0;
};
#endif /* SYLVESTER_SOLVER_H */
#endif

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef SYM_SCHUR_DECOMP_H
#define SYM_SCHUR_DECOMP_H
#ifndef SYM_SCHUR_DECOMP_HH
#define SYM_SCHUR_DECOMP_HH
#include "SylvMatrix.hh"

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef TRIANGULAR_SYLVESTER_H
#define TRIANGULAR_SYLVESTER_H
#ifndef TRIANGULAR_SYLVESTER_HH
#define TRIANGULAR_SYLVESTER_HH
#include "KronVector.hh"
#include "QuasiTriangular.hh"
@ -113,4 +113,4 @@ private:
static constexpr double diag_zero_sq = diag_zero * diag_zero;
};
#endif /* TRIANGULAR_SYLVESTER_H */
#endif

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef VECTOR_H
#define VECTOR_H
#ifndef VECTOR_HH
#define VECTOR_HH
/* NOTE: Vector and ConstVector have not common super class in order
to avoid running virtual method invokation mechanism. Some
@ -251,4 +251,4 @@ public:
void print() const;
};
#endif /* VECTOR_H */
#endif

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef MM_MATRIX_H
#define MM_MATRIX_H
#ifndef MM_MATRIX_HH
#define MM_MATRIX_HH
#include "GeneralMatrix.hh"
@ -79,4 +79,4 @@ public:
static void write(const std::string& fname, const GeneralMatrix& m);
};
#endif /* MM_MATRIX_H */
#endif

View File

@ -50,8 +50,8 @@
classes according to their averages, and according to the smallest
equivalence class element if the averages are the same. */
#ifndef EQUIVALENCE_H
#define EQUIVALENCE_H
#ifndef EQUIVALENCE_HH
#define EQUIVALENCE_HH
#include "int_sequence.hh"

View File

@ -42,8 +42,8 @@
similar thing for tensor multidimensional index. Thus, the abstraction
is not currently used, but it might be useful in future. */
#ifndef FINE_CONTAINER_H
#define FINE_CONTAINER_H
#ifndef FINE_CONTAINER_HH
#define FINE_CONTAINER_HH
#include "stack_container.hh"

View File

@ -24,8 +24,8 @@
tensors from here are identifying the multidimensional index with
columns. */
#ifndef FS_TENSOR_H
#define FS_TENSOR_H
#ifndef FS_TENSOR_HH
#define FS_TENSOR_HH
#include "int_power.hh"
#include "symmetry.hh"

View File

@ -34,8 +34,8 @@
also by number of variables for each group. This is dealt in the class
for tensor dimensions defined also here. */
#ifndef GS_TENSOR_H
#define GS_TENSOR_H
#ifndef GS_TENSOR_HH
#define GS_TENSOR_HH
#include "fs_tensor.hh"
#include "rfs_tensor.hh"

View File

@ -39,8 +39,8 @@
Also, we need to construct a subsequence of a sequence. */
#ifndef INT_SEQUENCE_H
#define INT_SEQUENCE_H
#ifndef INT_SEQUENCE_HH
#define INT_SEQUENCE_HH
#include <algorithm>
#include <initializer_list>

View File

@ -37,8 +37,8 @@
For this multiplication, we also need to represent products of type AI,
IAI and IA. */
#ifndef KRON_PROD_H
#define KRON_PROD_H
#ifndef KRON_PROD_HH
#define KRON_PROD_HH
#include <memory>
#include <utility>

View File

@ -113,8 +113,8 @@
exactly 2 elements.
*/
#ifndef NORMAL_MOMENTS_H
#define NORMAL_MOMENTS_H
#ifndef NORMAL_MOMENTS_HH
#define NORMAL_MOMENTS_HH
#include "t_container.hh"

View File

@ -45,8 +45,8 @@
which contains all permutation sets up to a given number.
*/
#ifndef PERMUTATION_H
#define PERMUTATION_H
#ifndef PERMUTATION_HH
#define PERMUTATION_HH
#include "equivalence.hh"
#include "int_sequence.hh"

View File

@ -54,8 +54,8 @@
dimensions is described by PerTensorDimens2. The tensor holding the
underlying data is FPSTensor. */
#ifndef PS_TENSOR_H
#define PS_TENSOR_H
#ifndef PS_TENSOR_HH
#define PS_TENSOR_HH
#include "equivalence.hh"
#include "gs_tensor.hh"

View File

@ -66,8 +66,8 @@
implemented in FGSContainer::multAndAdd() unfolded code or
FGSContainer::multAndAdd() folded code. */
#ifndef PYRAMID_PROD_H
#define PYRAMID_PROD_H
#ifndef PYRAMID_PROD_HH
#define PYRAMID_PROD_HH
#include "gs_tensor.hh"
#include "int_sequence.hh"

View File

@ -67,8 +67,8 @@
only through the index. Note that this does not matter, since
[f_zˡ] are sparse. */
#ifndef PYRAMID_PROD2_H
#define PYRAMID_PROD2_H
#ifndef PYRAMID_PROD2_HH
#define PYRAMID_PROD2_HH
#include "permutation.hh"
#include "rfs_tensor.hh"

View File

@ -52,8 +52,8 @@
implement getOffset(). Process of unfolding is not used, so we implemented
it so that unfolding and then folding a tensor would yield the same data. */
#ifndef RFS_TENSOR_H
#define RFS_TENSOR_H
#ifndef RFS_TENSOR_HH
#define RFS_TENSOR_HH
#include "fs_tensor.hh"
#include "symmetry.hh"

View File

@ -39,8 +39,8 @@
the only constructor of general symmetry sparse tensor is slicing from
the full symmetry sparse. */
#ifndef SPARSE_TENSOR_H
#define SPARSE_TENSOR_H
#ifndef SPARSE_TENSOR_HH
#define SPARSE_TENSOR_HH
#include "Vector.hh"
#include "gs_tensor.hh"

View File

@ -75,8 +75,8 @@
We have also two supporting classes StackProduct and KronProdStack
and a number of worker classes used as threads. */
#ifndef STACK_CONTAINER_H
#define STACK_CONTAINER_H
#ifndef STACK_CONTAINER_HH
#define STACK_CONTAINER_HH
#include "equivalence.hh"
#include "int_sequence.hh"

View File

@ -48,8 +48,8 @@
The symmetry is implemented as IntSequence, in fact, it inherits
from it. */
#ifndef SYMMETRY_H
#define SYMMETRY_H
#ifndef SYMMETRY_HH
#define SYMMETRY_HH
#include "equivalence.hh"
#include "int_sequence.hh"

View File

@ -58,8 +58,8 @@
multiplied by folded tensors g yielding folded tensor B, but unfolded tensor
h is multiplied by unfolded tensors g yielding unfolded tensor B. */
#ifndef T_CONTAINER_H
#define T_CONTAINER_H
#ifndef T_CONTAINER_HH
#define T_CONTAINER_HH
#include "Vector.hh"
#include "equivalence.hh"

View File

@ -51,6 +51,9 @@
compactification of the polynomial. The class derives from the tensor
and has a eval method. */
#ifndef T_POLYNOMIAL_HH
#define T_POLYNOMIAL_HH
#include "fs_tensor.hh"
#include "pascal_triangle.hh"
#include "rfs_tensor.hh"
@ -555,3 +558,5 @@ public:
{
}
};
#endif

View File

@ -57,8 +57,8 @@
objects are not used very often. They have limited usage due to their
specialized constructor. */
#ifndef TENSOR_H
#define TENSOR_H
#ifndef TENSOR_HH
#define TENSOR_HH
#include "int_sequence.hh"
#include "twod_matrix.hh"

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef FACTORY_H
#define FACTORY_H
#ifndef FACTORY_HH
#define FACTORY_HH
#include <memory>
#include <random>

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef MONOMS_H
#define MONOMS_H
#ifndef MONOMS_HH
#define MONOMS_HH
#include <memory>
#include <random>

View File

@ -27,8 +27,8 @@
some higher level. This header file defines a simple infrastructure
for this. */
#ifndef TL_EXCEPTION_H
#define TL_EXCEPTION_H
#ifndef TL_EXCEPTION_HH
#define TL_EXCEPTION_HH
#include <iostream>
#include <string>

View File

@ -29,8 +29,8 @@
TLStatic::init() must be called at the beginning of the program, as
soon as dimension and number of variables is known. */
#ifndef TL_STATIC_H
#define TL_STATIC_H
#ifndef TL_STATIC_HH
#define TL_STATIC_HH
#include "equivalence.hh"
#include "permutation.hh"

View File

@ -29,8 +29,8 @@
ConstTwoDMatrix. The only purpose of the latter is to allow submatrix
construction from const reference arguments. */
#ifndef TWOD_MATRIX_H
#define TWOD_MATRIX_H
#ifndef TWOD_MATRIX_HH
#define TWOD_MATRIX_HH
#include "GeneralMatrix.hh"

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef DYNARE_EXCEPTION_H
#define DYNARE_EXCEPTION_H
#ifndef DYNARE_EXCEPTION_HH
#define DYNARE_EXCEPTION_HH
#include <string>
#include <utility>

View File

@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef OGU_EXCEPTION_H
#define OGU_EXCEPTION_H
#ifndef EXCEPTION_HH
#define EXCEPTION_HH
#include <iostream>
#include <string>

View File

@ -1,5 +1,5 @@
/*
* Copyright © 2019 Dynare Team
* Copyright © 2019-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -17,5 +17,10 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef INT_POWER_HH
#define INT_POWER_HH
// Integer exponentiation (by squaring)
int power(int a, int b);
#endif

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2005 Ondra Kamenik
* Copyright © 2019 Dynare Team
* Copyright © 2019-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -18,8 +18,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef PASCAL_TRIANGLE_H
#define PASCAL_TRIANGLE_H
#ifndef PASCAL_TRIANGLE_HH
#define PASCAL_TRIANGLE_HH
#include <vector>

View File

@ -1,6 +1,6 @@
/*
* Copyright © 2004 Ondra Kamenik
* Copyright © 2019 Dynare Team
* Copyright © 2019-2023 Dynare Team
*
* This file is part of Dynare.
*
@ -38,8 +38,8 @@
The number of maximum parallel threads is controlled via a static member of
the detach_thread_group class. */
#ifndef STHREAD_H
#define STHREAD_H
#ifndef STHREAD_HH
#define STHREAD_HH
#include <condition_variable>
#include <map>

View File

@ -17,8 +17,8 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _MODIFY_FOR_MEX_H
#define _MODIFY_FOR_MEX_H
#ifndef MODIFY_FOR_MEX_H
#define MODIFY_FOR_MEX_H
#include <dynblas.h>
#include <dynlapack.h>
@ -56,4 +56,4 @@ _Noreturn
void
msExit(int status);
#endif // _MODIFY_FOR_MEX_H
#endif

View File

@ -17,6 +17,9 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef DYNAMIC_MODEL_CALLER_HH
#define DYNAMIC_MODEL_CALLER_HH
#include <algorithm>
#include <limits>
#include <memory>
@ -185,3 +188,5 @@ DynamicModelMatlabCaller::cmplxToReal(mxArray* cmplx_mx)
mxDestroyArray(cmplx_mx);
return real_mx;
}
#endif

View File

@ -22,6 +22,9 @@
** AUTHOR(S): stephane DOT adjemian AT univ DASH lemans DOT fr
*/
#ifndef GAUSSIAN_HH
#define GAUSSIAN_HH
#include <algorithm>
#include <array>
#include <cmath>
@ -162,3 +165,5 @@ usphereRadius(int d, int n, double radius, T* U)
U[k + i] = radius * U[k + i] / norm;
}
}
#endif

View File

@ -18,6 +18,9 @@
* along with Dynare. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef SOBOL_HH
#define SOBOL_HH
#include <cstdint>
#include <dynblas.h> // For the FORTRAN_WRAPPER macro
@ -63,3 +66,5 @@ expand_unit_hypercube(int dimension, int block_size, T* block, const T* lower_bo
}
delete[] hypercube_length;
}
#endif