-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master: Adapt to xrst-2024.3.28 (use new template command).
- Loading branch information
Showing
10 changed files
with
68 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
|
||
{xrst_begin 2003 app} | ||
{xrst_spell | ||
constructor constructor | ||
ddouble | ||
def | ||
dodds | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,6 @@ | |
pkgconfig | ||
prefixdir | ||
pthreads | ||
requirements requirements | ||
rosen | ||
svn | ||
tgz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ | |
ocurred | ||
pkgconfig | ||
txt | ||
values values | ||
} | ||
|
||
Release Notes for 2021 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,48 +2,19 @@ | |
// SPDX-FileCopyrightText: Bradley M. Bell <[email protected]> | ||
// SPDX-FileContributor: 2003-24 Bradley M. Bell | ||
// ---------------------------------------------------------------------------- | ||
|
||
/* | ||
{xrst_begin bthread_get_started.cpp} | ||
{xrst_spell | ||
fun fun | ||
} | ||
Getting Started Using Boost Multi-Threading With CppAD | ||
###################################################### | ||
in_parallel | ||
*********** | ||
see :ref:`ta_parallel_setup@in_parallel` . | ||
thread_number | ||
************* | ||
see :ref:`ta_parallel_setup@thread_num` . | ||
ADFun Constructor | ||
***************** | ||
If you use the :ref:`fun_construct@Sequence Constructor` for the original | ||
function, you will need to clear the Taylor coefficient memory associated | ||
with the function using :ref:`capacity_order-name` ; e.g. :: | ||
CppAD::ADFun fun(ax, ay); | ||
fun.capacity_order(0); | ||
If you do not free the Taylor coefficient memory in ``fun`` , | ||
the function assignments will allocate zero order Taylor coefficients for each | ||
function in ``fun_thread`` using thread zero. Depending on what you do in | ||
parallel mode, you may attempt to free that memory using another thread. | ||
For example, if you change USE_DEFAULT_ADFUN_CONSTRUCTOR to 0, you will | ||
get the message:: | ||
Attempt to return memory for a different thread while in parallel mode | ||
Source Code | ||
*********** | ||
{xrst_literal | ||
// BEGIN C++ | ||
// END C++ | ||
} | ||
{xrst_template , | ||
example/multi_thread/get_started.xrst | ||
@Name@ , Boost | ||
@####@ , ##### | ||
@DEFAULT@ , USE_DEFAULT_ADFUN_CONSTRUCTOR | ||
@Dir@ , bthread | ||
} | ||
{xrst_end bthread_get_started.cpp} | ||
------------------------------------------------------------------------------ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{xrst_comment: This template file has the following parameters: | ||
@Name@ : is the name of this threading system | ||
@####@ : is the underlining for the name of the threading system | ||
@DEFAULT@ : is macro a macro name. If it is 1 (0), | ||
the ADFun default ctor is used (is not used) | ||
@Dir@ : is the subdirectory of multi_thread that contins the source code | ||
for this get_started.cpp | ||
} | ||
|
||
Getting Started Using @Name@ Threads With CppAD | ||
######################@####@################### | ||
|
||
in_parallel | ||
*********** | ||
see :ref:`ta_parallel_setup@in_parallel` . | ||
|
||
thread_number | ||
************* | ||
see :ref:`ta_parallel_setup@thread_num` . | ||
|
||
ADFun Constructor | ||
***************** | ||
If you use the :ref:`fun_construct@Sequence Constructor` for the original | ||
function, you will need to clear the Taylor coefficient memory associated | ||
with the function using :ref:`capacity_order-name` ; e.g. :: | ||
|
||
CppAD::ADFun fun(ax, ay); | ||
fun.capacity_order(0); | ||
|
||
If you do not free the Taylor coefficient memory in ``fun`` , | ||
the function assignments will allocate zero order Taylor coefficients for each | ||
function in ``fun_thread`` using thread zero. Depending on what you do in | ||
parallel mode, you may attempt to free that memory using another thread. | ||
For example, if you change @DEFAULT@ from 1 to 0, you will | ||
get the message:: | ||
|
||
Attempt to return memory for a different thread while in parallel mode | ||
|
||
Source Code | ||
*********** | ||
{xrst_literal | ||
example/multi_thread/@Dir@/get_started.cpp | ||
// BEGIN C++ | ||
// END C++ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters