Purpose
This atomic function operation computes a square root using Newton's method.
It is meant to be very inefficient in order to demonstrate timing results.
au
This argument has prototype
const ADvector& au
where
ADvector
is a
simple vector class
with elements
of type AD<double>.
The size of
au
is three.
num_itr
We use the notation
num_itr = size_t( Integer( au[0] ) )
for the number of Newton iterations in the computation of the square root
function. The component
au[0]
must be a
parameter
.
y_initial
We use the notation
y_initial = au[1]
for the initial value of the Newton iterate.
y_squared
We use the notation
y_squared = au[2]
for the value we are taking the square root of.
ay
This argument has prototype
ADvector& ay
The size of
ay
is one and
ay[0]
is the square root of
y_squared
.
Limitations
Only zero order forward mode is implements for the
atomic_user class.