19 #include <iostream.hpp>
46 assert(num_bytes > 0);
49 cout <<
"in report_gradstack_flag " << str1 <<
endl;
52 #if defined(CHK_ID_STRING)
64 fp->
fread(&num_bytes,
sizeof(
int));
68 assert(num_bytes >= 0);
70 fp->
fread(str1, (
size_t)num_bytes);
72 fp->
fread(&j,
sizeof(
int));
73 fp->
fread(&i,
sizeof(
int));
74 cout <<
"in report_gradstack_flag " << str1 <<
endl;
84 #if defined(CHK_ID_STRING)
87 int length=(int)strlen(str);
89 size_t _length = strlen(str);
90 assert(_length <= INT_MAX);
91 int length=(int)_length;
98 fp->
fwrite(str, (
size_t)length);
99 fp->
fwrite(&length,
sizeof(
int));
111 #if defined(CHK_ID_STRING)
118 char *
str=(
char*)(ads);
120 int length=(int)strlen(str);
122 size_t _length = strlen(str);
123 assert(_length <= INT_MAX);
124 int length=(int)_length;
128 fp->
fwrite(&i,
sizeof(
int));
129 fp->
fwrite(&j,
sizeof(
int));
133 fp->
fwrite(str, (
size_t)length);
134 fp->
fwrite(&length,
sizeof(
int));
151 #if defined(CHK_ID_STRING)
154 size_t num_bytes=strlen(str1);
161 cerr <<
"Error reading stack identifer for " << str1 <<
endl;
174 #if defined(CHK_ID_STRING)
177 long int num_bytes=5;
181 assert(num_bytes > 0);
229 size_t wsize=
sizeof(
void *);
241 size_t wsize=
sizeof(
void *);
void * restore_ad_pointer(void)
Description not yet available.
void save_ivector_position() const
Description not yet available.
void save_ivector_position(const ivector &v)
Description not yet available.
void verify_identifier_string(const char *)
Verifies gradient stack string.
adstring get_string_marker(void)
Description not yet available.
void set_gradient_stack(void(*func)(void), double *dep_addr, double *ind_addr1=NULL, double mult1=0, double *ind_addr2=NULL, double mult2=0)
Description not yet available.
prnstream & endl(prnstream &)
Array of integers(int) with indexes from index_min to indexmax.
Description not yet available.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void set_gradstack_flag(char *str)
Description not yet available.
static _THREAD gradient_structure * _instance
int save_identifier_string(const char *)
Writes a gradient stack verification string.
adstring str(double x, int minwidth=17, int decplaces=-1)
Convert x to adstring with minimum width and total number of decimal places.
void save_ad_pointer(void *p)
Description not yet available.
void save_dvar_vector_position(const dvar_vector &v)
static _THREAD DF_FILE * fp
void save_dvar_vector_position() const
Description not yet available.
Stores the adjoint gradient data that will be processed by gradcalc.
void fwrite(const void *s, const size_t num_bytes)
Reads num_bytes from s and writes to buffer.
void fread(void *s, const size_t num_bytes)
Reads num_bytes from buffer and copies to s.
static _THREAD grad_stack * GRAD_STACK1
void report_gradstack_flag(void)
Description not yet available.
class for things related to the gradient structures, including dimension of arrays, size of buffers, etc.
static void report_gradstack_flag2(void)
Description not yet available.
size_t length(const adstring &t)
Returns the size of adstr.