Skip to content

Commit

Permalink
master: speed/adolc/*.cpp: white space edit.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradbell committed Sep 28, 2024
1 parent 5fe86eb commit 806f0c6
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions speed/adolc/det_lu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ bool link_det_lu(
return false;
// -----------------------------------------------------
// setup
short tag = 0; // tape identifier
int keep = 1; // keep forward mode results in buffer
int m = 1; // number of dependent variables
short tag = 0; // tape identifier
int keep = 1; // keep forward mode results in buffer
int m = 1; // number of dependent variables
int n = int(size * size); // number of independent variables
double f; // function value
int j; // temporary index
double f; // function value
int j; // temporary index

// set up for thread_alloc memory allocator (fast and checks for leaks)
using CppAD::thread_alloc; // the allocator
Expand Down
6 changes: 3 additions & 3 deletions speed/adolc/det_minor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace {
CppAD::det_by_minor<adouble> a_det(size);

// declare independent variables
int keep = 1; // keep forward mode results
int keep = 1; // keep forward mode results
trace_on(tag, keep);
CppAD::vector<adouble> a_A(n);
for(int j = 0; j < n; ++j)
Expand Down Expand Up @@ -85,7 +85,7 @@ bool link_det_minor(
int n = int(size * size);
//
// tape identifier
short tag = 0;
short tag = 0;
//
bool onetape = global_option["onetape"];
// ----------------------------------------------------------------------
Expand Down Expand Up @@ -126,7 +126,7 @@ bool link_det_minor(
CppAD::uniform_01( size_t(n), matrix);

// evaluate the determinant at the new matrix value
int keep = 1; // keep this forward mode result
int keep = 1; // keep this forward mode result
double f; // function result
zos_forward(tag, m, n, keep, matrix.data(), &f);

Expand Down
12 changes: 6 additions & 6 deletions speed/adolc/mat_mul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ bool link_mat_mul(
typedef adouble ADScalar;
typedef ADScalar* ADVector;

short tag = 0; // tape identifier
int m = 1; // number of dependent variables
short tag = 0; // tape identifier
int m = 1; // number of dependent variables
int n = int(size * size); // number of independent variables
double f; // function value
int j; // temporary index
double f; // function value
int j; // temporary index

// set up for thread_alloc memory allocator (fast and checks for leaks)
using CppAD::thread_alloc; // the allocator
Expand Down Expand Up @@ -80,7 +80,7 @@ bool link_mat_mul(
CppAD::uniform_01( size_t(n), mat);

// declare independent variables
int keep = 1; // keep forward mode results
int keep = 1; // keep forward mode results
trace_on(tag, keep);
for(j = 0; j < n; j++)
X[j] <<= mat[j];
Expand All @@ -100,7 +100,7 @@ bool link_mat_mul(
CppAD::uniform_01( size_t(n), mat);

// declare independent variables
int keep = 0; // do not keep forward mode results
int keep = 0; // do not keep forward mode results
trace_on(tag, keep);
for(j = 0; j < n; j++)
X[j] <<= mat[j];
Expand Down
10 changes: 5 additions & 5 deletions speed/adolc/ode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ bool link_ode(
typedef CppAD::vector<double> DblVector;

size_t i, j;
short tag = 0; // tape identifier
int keep = 0; // do not keep forward mode results
size_t p = 0; // use ode to calculate function values
size_t n = size; // number of independent variables
size_t m = n; // number of dependent variables
short tag = 0; // tape identifier
int keep = 0; // do not keep forward mode results
size_t p = 0; // use ode to calculate function values
size_t n = size; // number of independent variables
size_t m = n; // number of dependent variables
ADVector X(n), Y(m); // independent and dependent variables
DblVector f(m); // function value

Expand Down
4 changes: 2 additions & 2 deletions speed/adolc/poly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ bool link_poly(
int keep = 0; // do not keep forward mode results in buffer
int m = 1; // number of dependent variables
int n = 1; // number of independent variables
int d = 2; // highest derivative degree
double f; // function value
int d = 2; // highest derivative degree
double f; // function value

// set up for thread_alloc memory allocator (fast and checks for leaks)
using CppAD::thread_alloc; // the allocator
Expand Down
4 changes: 2 additions & 2 deletions speed/adolc/sparse_hessian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ bool link_sparse_hessian(
CppAD::uniform_01( size_t(n), x);

// declare independent variables
int keep = 0; // keep forward mode results
int keep = 0; // keep forward mode results
trace_on(tag, keep);
for(size_t j = 0; j < n; j++)
a_x[j] <<= x[j];
Expand Down Expand Up @@ -124,7 +124,7 @@ bool link_sparse_hessian(
CppAD::uniform_01( size_t(n), x);

// declare independent variables
int keep = 0; // keep forward mode results
int keep = 0; // keep forward mode results
trace_on(tag, keep);
for(size_t j = 0; j < n; j++)
a_x[j] <<= x[j];
Expand Down
4 changes: 2 additions & 2 deletions speed/adolc/sparse_jacobian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace {
typedef vector<adouble> a_vector;
void setup(
// inputs
short tag ,
short tag ,
size_t size ,
size_t m ,
const s_vector& row ,
Expand All @@ -55,7 +55,7 @@ namespace {
double*& values )
{ // independent variables
CPPAD_ASSERT_UNKNOWN( size = x.size() );
int keep = 0; // keep forward mode results
int keep = 0; // keep forward mode results
trace_on(tag, keep);
size_t n = size;
a_vector a_x(n);
Expand Down

0 comments on commit 806f0c6

Please sign in to comment.