1 /* Siconos is a program dedicated to modeling, simulation and control 2 * of non smooth dynamical systems. 3 * 4 * Copyright 2021 INRIA. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 #ifndef SparseMatrix_internal_H 20 #define SparseMatrix_internal_H 21 22 /*!\file SparseMatrix_internal.h 23 * \brief non-public functions and data structures for CSparseMatrix 24 * 25 * Include this file from .c/.cpp files if there is a need to access 26 * members of CSparseMatrix (treat it as non-opaque type) or call 27 * CXSparse functions. 28 * 29 * To use the correct cs_* functions, privately define CS_LONG 30 * according to SICONOS_INT64. User code must do the same, but we do 31 * not impose on user code independently using CXSparse by defining 32 * CS_LONG in our external headers. Nonetheless CSparseMatrix is 33 * typedef'd according to SICONOS_INT64 in SparseMatrix.h, therefore 34 * it should throw a type error if there is a mismatch. 35 */ 36 37 #include "SiconosConfig.h" 38 #ifdef SICONOS_INT64 39 #define CS_LONG 40 #endif 41 42 /* Siconos does not need "complex" part of CXSparse, so avoid 43 * compilation C++-related problems with this flag (complex_t vs 44 * std::complex). */ 45 #define NCOMPLEX 46 47 #include "cs.h" 48 49 #include "CSparseMatrix.h" 50 51 #endif // SparseMatrix_internal_H 52