source: trunk/ADOL-C/include/adolc/sparse/sparsedrivers.h @ 354

Last change on this file since 354 was 354, checked in by kulshres, 8 years ago

Move all external headers into a separate directory

This let's us get rid of the symlink adolc that was previously required
for building and created problems sometimes
This also adjusts all Makefiles for examples to make external builds
possible.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
Line 
1/*----------------------------------------------------------------------------
2 ADOL-C -- Automatic Differentiation by Overloading in C++
3 File:     sparse/sparsedrivers.h
4 Revision: $Id: sparsedrivers.h 354 2012-10-01 11:32:26Z kulshres $
5 Contents: This file containts some "Easy To Use" interfaces of sparse package.
6 
7 Copyright (c) Andrea Walther
8
9 This file is part of ADOL-C. This software is provided as open source.
10 Any use, reproduction, or distribution of the software constitutes
11 recipient's acceptance of the terms of the accompanying license file.
12 
13----------------------------------------------------------------------------*/
14#if !defined (ADOLC_SPARSE_SPARSE_H)
15#define ADOLC_SPARSE_SPARSE_H 1
16
17#include <adolc/common.h>
18
19
20
21BEGIN_C_DECLS
22
23
24
25/****************************************************************************/
26
27
28/*--------------------------------------------------------------------------*/
29/*                                                         jacobian pattern */
30/* jac_pat(tag, m, n, argument,                                             */
31/*         crs[] [ crs[][0] = non-zero independent blocks per row ],        */
32/*         options[3])                                                      */
33/*                                                                          */
34
35ADOLC_DLL_EXPORT int jac_pat
36(short,int,int,const double*,unsigned int**,int*);
37
38/*--------------------------------------------------------------------------*/
39/*                                         seed matrix for sparse jacobian  */
40/* generate_seed_jac(m, n, crs, &seed, &p, option);                         */
41
42ADOLC_DLL_EXPORT void generate_seed_jac
43(int, int, unsigned int**, double***, int*, int);
44
45/*--------------------------------------------------------------------------*/
46/*                                                         sparse jacobian  */
47/* int sparse_jac(tag, m, n, repeat, x, &nnz, &row_ind, &col_ind, &values,  */
48/*                options[3]);                                              */
49
50ADOLC_DLL_EXPORT int sparse_jac
51(short, int , int, int, const double*, int *,
52 unsigned int **, unsigned int **, double **,int*);
53
54
55/*--------------------------------------------------------------------------*/
56/*                                                          hessian pattern */
57/* hess_pat(tag, n, x[n], crs[n][*], option)                                */
58/*                                                                          */
59/*     crs[i][ crs[i][0] = non-zero entries per row ]                       */
60/*                                                                          */
61
62ADOLC_DLL_EXPORT int hess_pat(short,int,const double*,unsigned int**, int);
63
64/*--------------------------------------------------------------------------*/
65/*                                          seed matrix for sparse hessian  */
66/* generate_seed_hess(n, crs, &seed, &p, option);                           */
67
68ADOLC_DLL_EXPORT void generate_seed_hess
69(int, unsigned int**, double***, int*, int);
70
71/*--------------------------------------------------------------------------*/
72/*                                                          sparse hessian  */
73/* int sparse_hess(tag, n, repeat, x, &nnz, &row_ind, &col_ind, &values,    */
74/*                 options[2]);                                             */
75
76ADOLC_DLL_EXPORT int sparse_hess
77(short, int , int, const double*, int *,
78 unsigned int **, unsigned int **, double **,int*);
79
80ADOLC_DLL_EXPORT void set_HP(
81    short          tag,        /* tape identification                     */
82    int            indep,      /* number of independent variables         */
83    unsigned int ** HP);
84
85ADOLC_DLL_EXPORT void get_HP(
86    short          tag,        /* tape identification                     */
87    int            indep,      /* number of independent variables         */
88    unsigned int *** HP);
89
90/*--------------------------------------------------------------------------*/
91/*                                                   JACOBIAN BLOCK PATTERN */
92
93/* Max. number of unsigned ints to store the seed / jacobian matrix strips.
94   Reduce this value to x if your system happens to run out of memory.
95   x < 10 makes no sense. x = 50 or 100 is better
96   x stays for ( x * sizeof(unsigned long int) * 8 )
97   (block) variables at once                                            */
98
99#define PQ_STRIPMINE_MAX 30
100
101ADOLC_DLL_EXPORT int bit_vector_propagation
102(short, int, int, const double*, unsigned int**, int*);
103
104/****************************************************************************/
105END_C_DECLS
106
107#endif
Note: See TracBrowser for help on using the repository browser.