Actual source code: adintr_acosh.c
petsc-3.3-p7 2013-05-11
1: /*
2: macro expansion:
3: function_driver -> adintr_acosh
4: exception number -> ADINTR_ACOSH
5: exceptional code ->
6: *fx = ADIntr_Partials[ADINTR_ACOSH][ADINTR_FX];
7: *fxx = ADIntr_Partials[ADINTR_ACOSH][ADINTR_FXX];
9: */
11: #include <stdarg.h>
12: #include <adintrinsics.h>
13: #include <knr-compat.h>
15: #if defined(__cplusplus)
16: extern "C" {
17: #endif
19: /* #include "report-once.h" */
20: void reportonce_accumulate Proto((int,int,int));
23: void
24: adintr_acosh (int deriv_order, int file_number, int line_number,
25: double*fx, ...)
26: {
27: /* Hack to make assignments to (*fxx) et alia OK, regardless */
28: double scratch;
29: double *fxx = &scratch;
31: const int exception = ADINTR_ACOSH;
33: va_list argptr;
34: va_start(argptr,fx);
36: if (deriv_order == 2)
37: {
38: fxx = va_arg(argptr, double *);
39: }
41: /* Here is where exceptional partials should be set. */
42: *fx = ADIntr_Partials[ADINTR_ACOSH][ADINTR_FX];
43: *fxx = ADIntr_Partials[ADINTR_ACOSH][ADINTR_FXX];
46: /* Here is where we perform the action appropriate to the current mode. */
47: if (ADIntr_Mode == ADINTR_REPORTONCE)
48: {
49: reportonce_accumulate(file_number, line_number, exception);
50: }
51:
52: va_end(argptr);
53: }
54: #if defined(__cplusplus)
55: }
56: #endif