MACRO-FREE TESTING WITH C++20
CPPCON 2020 / CPPCON 2020 / MACRO-FREE TESTING MACRO-FREE TESTING WITH C++20 WITH C++20 | | | | HTTPS://BOOST-EXT.GITHUB.IO/UT/CPPCON-2020 HTTPS://BOOST-EXT.GITHUB.IO/UT/CPPCON-2020 KRIS@JUSIAK SINGLE (2K LOC) WITH NO EXTERNAL DEPENDENCIES (2K LOC) WITH NO EXTERNAL DEPENDENCIES MACRO-FREE (✔ ) MACRO-FREE (✔ ) (*) LIMITATIONS MAY APPLY (*) LIMITATIONS MAY APPLY HTTPS://GITHUB.COM/BOOST-EXT/UT SINGLE (2K LOC) WITH NO EXTERNAL DEPENDENCIES (2K LOC) WITH NO EXTERNAL DEPENDENCIES MACRO-FREE (✔ ) MACRO-FREE (✔ ) FEATURES ( FEATURES ( , , , , , , , , , , , , , , ) (*) LIMITATIONS MAY0 码力 | 53 页 | 1.98 MB | 5 月前3julia 1.10.10
Communication and synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . 302 24.4 The @threads Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 24.5 Atomic Operations . For example, if you compute 2 .* A.^2 .+ sin.(A) (or equivalently @. 2A^2 + sin(A), using the @. macro) for an array A, it performs a single loop over A, computing 2a^2 + sin(a) for each element a of possible to create a view into a string using the type SubString. More simply, using the @views macro on a block of code converts all string slices into substrings. For example: julia> str = "long string"0 码力 | 1692 页 | 6.34 MB | 3 月前3Julia 1.10.9
Communication and synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . 302 24.4 The @threads Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 24.5 Atomic Operations . For example, if you compute 2 .* A.^2 .+ sin.(A) (or equivalently @. 2A^2 + sin(A), using the @. macro) for an array A, it performs a single loop over A, computing 2a^2 + sin(a) for each element a of possible to create a view into a string using the type SubString. More simply, using the @views macro on a block of code converts all string slices into substrings. For example: julia> str = "long string"0 码力 | 1692 页 | 6.34 MB | 3 月前3Julia 1.11.4
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 25.3 The @threads Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 25.4 Communication and data-races or setrounding and @big_str, the macro used for big string literals (such as big"0.3"), might not be intuitive, as a consequence of the fact that @big_str is a macro. See the @big_str documentation for For example, if you compute 2 .* A.^2 .+ sin.(A) (or equivalently @. 2A^2 + sin(A), using the @. macro) for an array A, it performs a single loopCHAPTER 6. MATHEMATICAL OPERATIONS AND ELEMENTARY FUNCTIONS0 码力 | 2007 页 | 6.73 MB | 3 月前3Julia 1.11.5 Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 25.3 The @threads Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 25.4 Communication and data-races or setrounding and @big_str, the macro used for big string literals (such as big"0.3"), might not be intuitive, as a consequence of the fact that @big_str is a macro. See the @big_str documentation for For example, if you compute 2 .* A.^2 .+ sin.(A) (or equivalently @. 2A^2 + sin(A), using the @. macro) for an array A, it performs a single loopCHAPTER 6. MATHEMATICAL OPERATIONS AND ELEMENTARY FUNCTIONS0 码力 | 2007 页 | 6.73 MB | 3 月前3Julia 1.11.6 Release Notes
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 25.3 The @threads Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 25.4 Communication and data-races or setrounding and @big_str, the macro used for big string literals (such as big"0.3"), might not be intuitive, as a consequence of the fact that @big_str is a macro. See the @big_str documentation for For example, if you compute 2 .* A.^2 .+ sin.(A) (or equivalently @. 2A^2 + sin(A), using the @. macro) for an array A, it performs a single loopCHAPTER 6. MATHEMATICAL OPERATIONS AND ELEMENTARY FUNCTIONS0 码力 | 2007 页 | 6.73 MB | 3 月前3Scientific Unit Testing
give us a few pointers... 17Basic lab procedure: weighing a sample Question: do you believe we have 30 grams of coffee? Not 30g coffee! 18Basic lab procedure: weighing a sample Zero the scale with lab procedure: weighing a sample Only after calibrating our equipment for exactly the situation to be measured can we trust the result. Actually 30g of coffee 20This is exactly TDD's procedure for "The Scientific Method" 42Acknowledgements Kris Jusiak, Quantlab Financial Check out his C++20 macro-free unit test framework at github.com/boost-experimental/ut Neil Sexon, SciTec for peer reviews0 码力 | 45 页 | 1.91 MB | 5 月前3julia 1.13.0 DEV
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 25.3 The @threads Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 25.4 Communication and data-races or setrounding and @big_str, the macro used for big string literals (such as big"0.3"), might not be intuitive, as a consequence of the fact that @big_str is a macro. See the @big_str documentation for For example, if you compute 2 .* A.^2 .+ sin.(A) (or equivalently @. 2A^2 + sin(A), using the @. macro) for an array A, it performs a single loop over A, computing 2a^2 + sin(a) for each element a of0 码力 | 2058 页 | 7.45 MB | 3 月前3Julia 1.12.0 Beta4
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 25.3 The @threads Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 25.4 Communication and data-races or setrounding and @big_str, the macro used for big string literals (such as big"0.3"), might not be intuitive, as a consequence of the fact that @big_str is a macro. See the @big_str documentation for For example, if you compute 2 .* A.^2 .+ sin.(A) (or equivalently @. 2A^2 + sin(A), using the @. macro) for an array A, it performs a single loopCHAPTER 6. MATHEMATICAL OPERATIONS AND ELEMENTARY FUNCTIONS0 码力 | 2057 页 | 7.44 MB | 3 月前3Julia 1.12.0 Beta3
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 25.3 The @threads Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 25.4 Communication and data-races or setrounding and @big_str, the macro used for big string literals (such as big"0.3"), might not be intuitive, as a consequence of the fact that @big_str is a macro. See the @big_str documentation for For example, if you compute 2 .* A.^2 .+ sin.(A) (or equivalently @. 2A^2 + sin(A), using the @. macro) for an array A, it performs a single loopCHAPTER 6. MATHEMATICAL OPERATIONS AND ELEMENTARY FUNCTIONS0 码力 | 2057 页 | 7.44 MB | 3 月前3
共 155 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16