CppADCodeGen  HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
lang_c_atomic_fun.hpp
1 #ifndef CPPAD_CG_LANG_C_ATOMIC_FUN_INCLUDED
2 #define CPPAD_CG_LANG_C_ATOMIC_FUN_INCLUDED
3 /* --------------------------------------------------------------------------
4  * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation:
5  * Copyright (C) 2013 Ciengis
6  *
7  * CppADCodeGen is distributed under multiple licenses:
8  *
9  * - Eclipse Public License Version 1.0 (EPL1), and
10  * - GNU General Public License Version 3 (GPL3).
11  *
12  * EPL1 terms and conditions can be found in the file "epl-v10.txt", while
13  * terms and conditions for the GPL3 can be found in the file "gpl3.txt".
14  * ----------------------------------------------------------------------------
15  * Author: Joao Leal
16  */
17 
18 extern "C" {
19 
25 typedef struct Array {
30  void* data;
34  unsigned long size;
38  int sparse;
42  const unsigned long* idx;
46  unsigned long nnz;
47 } Array;
48 
56  void* libModel;
57 
58  int (*forward)(void* libModel,
59  int atomicIndex,
60  int q,
61  int p,
62  const Array tx[],
63  Array* ty);
64 
65  int (*reverse)(void* libModel,
66  int atomicIndex,
67  int p,
68  const Array tx[],
69  Array* px,
70  const Array py[]);
71 };
72 
73 }
74 
75 #endif
unsigned long nnz
const unsigned long * idx
unsigned long size