Codebase list cppad / 35a669d
master: 1. Make sure variable passed to CHECK_CXX_SOURCE_RUNS is not defined. 2. Fix some recent tabs by convertnng them to spaces. speed_test.hpp: Add some See Also links. Brad Bell 5 years ago
8 changed file(s) with 51 addition(s) and 26 deletion(s). Raw diff Collapse all Expand all
7171 git add --all
7272 git commit -m 'master: change to stable version number'
7373 gh_pages.sh
74 git commit -m 'update gh-pages to version $stable_version'
75 git push
76 git checkout master
74 git commit -m 'update gh-pages to version $stable_version'
75 git push
76 git checkout master
7777 EOF
78 rm new_release.$$
79 exit 1
78 rm new_release.$$
79 exit 1
8080 fi
8181 rm new_release.$$
8282 # =============================================================================
206206 # tag the documentation
207207 #
208208 echo_eval git tag -a -m \"created by bin/new_release.sh\" \
209 $stable_version.doc $doc_hash
209 $stable_version.doc $doc_hash
210210 #
211211 echo_eval git push origin $stable_version.doc
212212 # =============================================================================
00 # -----------------------------------------------------------------------------
1 # CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
1 # CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-18 Bradley M. Bell
22 #
33 # CppAD is distributed under the terms of the
44 # Eclipse Public License Version 2.0.
1212 #
1313 # source: (in)
1414 # contains the source for the program that will be run.
15 #
15 #
1616 # variable: (out)
17 # the value of this variable is 1 if the program runs and
17 # This variable must not be defined when this macro is called.
18 # Upon return, the value of this variable is 1 if the program runs and
1819 # returns a zero status. Otherwise its value is 0.
1920 # Note that this is the reverse of the status flag returned by the program.
20 #
21 #
2122 MACRO(check_source_runs source variable)
23 IF( DEFINED ${variable} )
24 MESSAGE(ERROR
25 "check_source_runs: expected ${variable} to not be defined"
26 )
27 ENDIF( DEFINED ${variable} )
2228 SET(CMAKE_REQUIRED_INCLUDES "" )
2329 SET(CMAKE_REQUIRED_LIBRARIES "" )
2430 SET(CMAKE_REQUIRED_DEFINITIONS "" )
2733 ELSE( cppad_cxx_flags )
2834 SET(CMAKE_REQUIRED_FLAGS "" )
2935 ENDIF( cppad_cxx_flags )
30 CHECK_CXX_SOURCE_RUNS("${source}" ${variable}_result)
31 IF( ${variable}_result )
36 CHECK_CXX_SOURCE_RUNS("${source}" ${variable} )
37 IF( ${variable} )
3238 SET(${variable} 1)
33 ELSE( ${variable}_result )
39 ELSE( ${variable} )
3440 SET(${variable} 0)
35 ENDIF( ${variable}_result )
41 ENDIF( ${variable} )
3642 MESSAGE(STATUS "${variable} = ${${variable}}" )
3743 ENDMACRO( check_source_runs )
7272
7373 $table
7474 $href%https://github.com/coin-or/CppAD/releases%
75 releases%$$, $cnext
75 releases%$$, $cnext
7676 $href%https://github.com/coin-or/CppAD/archive/20190200.0.tar.gz%
77 20190200.0%$$, $cnext
77 20190200.0%$$, $cnext
7878 $href%https://github.com/coin-or/CppAD%
79 github%$$, $cnext
79 github%$$, $cnext
8080 $href%https://travis-ci.org/coin-or/CppAD%
81 travis%$$, $cnext
81 travis%$$, $cnext
8282 $href%https://ci.appveyor.com/project/bradbell/cppad%
83 appveyor%$$, $cnext
83 appveyor%$$, $cnext
8484 $href%https://src.fedoraproject.org/rpms/cppad/blob/master/f/cppad.spec%
85 cppad.spec%$$ $cnext
85 cppad.spec%$$ $cnext
8686 $tend
8787 $pre
8888
5151 # abort this search when find a match
5252 IF( NOT bthread_lib )
5353 #
54 SET(CMAKE_REQUIRED_DEFINITIONS "")
5455 SET(CMAKE_REQUIRED_INCLUDES "${boost_prefix}/${idir}")
5556 SET(CMAKE_REQUIRED_LIBRARIES "${lname}" )
5657 SET(lpath "${boost_prefix}/${ldir}" )
6364 return 0;
6465 }" )
6566 SET(flag ${idir}_${ldir}_${lname}_ok )
67 UNSET( $flag )
6668 CHECK_CXX_SOURCE_RUNS("${source}" ${flag} )
6769 IF ( ${flag} )
6870 SET(bthread_lib ${lname} )
220220 # -----------------------------------------------------------------------------
221221 # check that cppad_max_num_threads is >= 4
222222 #
223 SET(CMAKE_REQUIRED_INCLUDES "")
224 SET(CMAKE_REQUIRED_LIBRARIES "")
225 SET(CMAKE_REQUIRED_FLAGS )
223 SET(CMAKE_REQUIRED_DERINITIONS "")
224 SET(CMAKE_REQUIRED_INCLUDES "")
225 SET(CMAKE_REQUIRED_LIBRARIES "")
226 SET(CMAKE_REQUIRED_FLAGS "")
226227 SET(source "
227228 int main(void)
228229 { const char* number = \"${cppad_max_num_threads}\";
243244 }
244245 " )
245246 # Using CHECK_CXX_SOURCE_RUNS directly (instead of check_source_runs).
246 CHECK_CXX_SOURCE_RUNS("${source}" cppad_max_num_threads_is_integer_ge_4)
247 UNSET( cppad_max_num_threads_is_integer_ge_4 )
248 CHECK_CXX_SOURCE_RUNS("${source}" cppad_max_num_threads_is_integer_ge_4 )
247249 IF( NOT cppad_max_num_threads_is_integer_ge_4 )
248250 MESSAGE(FATAL_ERROR
249251 "cppad_max_num_threads is not an integer greater than or equal 4"
2828 ENDFOREACH(sign signed unsigned)
2929 ENDFOREACH(base_type)
3030 #
31 SET(CMAKE_REQUIRED_DERINITIONS "")
32 SET(CMAKE_REQUIRED_INCLUDES "")
33 SET(CMAKE_REQUIRED_LIBRARIES "")
34 SET(CMAKE_REQUIRED_FLAGS "")
3135 FOREACH(pod_type ${pod_type_list})
3236 STRING(REPLACE " " "_" pod_type_var "${pod_type}")
3337 SET(pod_type_var "pod_type_${pod_type_var}")
3741 SET(source
3842 "${is_pod_default} ${is_pod_specialize_98} ${line} ${is_pod_main}"
3943 )
44 IF( DEFINED ${pod_type_var} )
45 MESSAGE(ERROR "{pod_type_var} is defined before expected")
46 ENDIF( DEFINED ${pod_type_var} )
4047 CHECK_CXX_SOURCE_RUNS("${source}" ${pod_type_var} )
4148 IF( ${pod_type_var} )
4249 SET(is_pod_specialize_98 "${is_pod_specialize_98}${line}")
6269 "${is_pod_default} ${is_pod_specialize_98} ${is_pod_specialize_11}
6370 ${line} ${is_pod_main}"
6471 )
72 IF( DEFINED ${pod_type_var} )
73 MESSAGE(ERROR "{pod_type_var} is defined before expected")
74 ENDIF( DEFINED ${pod_type_var} )
6575 CHECK_CXX_SOURCE_RUNS("${source}" ${pod_type_var} )
6676 IF( ${pod_type_var} )
6777 SET(is_pod_specialize_11 "${is_pod_specialize_11}${line}")
3636 $codei%# include <cppad/utility/speed_test.hpp>
3737 %$$
3838 $icode%rate_vec% = speed_test(%test%, %size_vec%, %time_min%)%$$
39
40 $head See Also$$
41 $cref time_test$$
3942
4043 $head Purpose$$
4144 The $code speed_test$$ function executes a speed test
210213 %$$
211214 $codei%SpeedTest(%Test%, %first%, %inc%, %last%)%$$
212215
216 $head See Also$$
217 $cref time_test$$
213218
214219 $head Purpose$$
215220 The $code SpeedTest$$ function executes a speed test
1919 hes
2020 chkpoint
2121 var
22 subgraph
23 Jacobians
22 subgraph
23 Jacobians
2424 $$
2525
2626 $section Changes and Additions to CppAD During 2019$$