Iteration Revisited
ITERATION REVISITED ITERATION BASICS int arr[] = {1, 2, 3, 4, 5}; size_t sz = 5; for (size_t i = 0; i < sz; i�++) { do_something(arr[i]); } 2ITERATION REVISITED ITERATION BASICS for (size_t do_something(arr[i]); } 3ITERATION REVISITED ITERATION BASICS for (int* p = arr; p �!= arr + sz; �++p) { do_something(*p); } 4ITERATION REVISITED ITERATION BASICS for (int* p = std�::begin(arr); do_something(*p); } 5ITERATION REVISITED ITERATION BASICS for (auto iter = std�::begin(arr); iter �!= std�::end(arr); �++iter) { do_something(*iter); } 6ITERATION REVISITED STL ITERATORS0 码力 | 56 页 | 5.27 MB | 5 月前3Distributed Ranges: A Model for Building Distributed Data Structures, Algorithms, and Views
T(0), std::plus()); }Standard C++ Parallelism - All depends on ranges library, iteration concepts - Extensible: execution policies allow parallel execution using namespace std; using reduce(policy, z.begin(), z.end(), T(0), std::plus()); } - All depends on ranges library, iteration concepts - Extensible: execution policies allow parallel execution - Standard allows implementation-defined reduce(policy, z.begin(), z.end(), T(0), std::plus()); } - All depends on ranges library, iteration concepts - Extensible: execution policies allow parallel execution - Standard allows implementation-defined0 码力 | 127 页 | 2.06 MB | 5 月前3GraphBLAS: Building a C++ Matrix API for Graph Algorithms
Distinct set of keys - Each key associated with a value - Individual lookup/insertion by key - Iteration over unordered range of values Sparse Matrix - Similarities to std::unordered_map 75 [“x”] Distinct set of keys - Each key associated with a value - Individual lookup/insertion by key - Iteration over unordered range of values Sparse Matrix - Similarities to std::unordered_map 76 [“x”] Distinct set of keys - Each key associated with a value - Individual lookup/insertion by key - Iteration over unordered range of values Sparse Matrix - Similarities to std::unordered_map 77 [“x”]0 码力 | 172 页 | 7.40 MB | 5 月前3Express Your Expectations: A Fast, Compliant JSON Pull Parser for Writing Robust Applications
Internal iteration Idea: Don’t store intermediate results, immediately pass them to caller. Jonathan Müller — @foonathan Express your expectations CppCon 2023-10-03 353. Internal iteration template {} } } Jonathan Müller — @foonathan Express your expectations CppCon 2023-10-03 363. Internal iteration templateauto filter(const Rng& rng, Fn predicate) { return [=](auto& }; } Jonathan Müller — @foonathan Express your expectations CppCon 2023-10-03 373. Internal iteration template auto transform(const Rng& rng, Fn fn) { return [=](auto& 0 码力 | 143 页 | 736.91 KB | 5 月前31.8 Go 在持续交付中的实践
Solution: **Docker** # Demo Iteration 1 > go install github.com/DaoCloud/shop > go test github.com/DaoCloud/shop CHEERS ☺ Iteration 1 Iteration 2 NOT BAD Iteration 2 > go install github.com/DaoCloud/shop test github.com/DaoCloud/shop Iteration 3Iteration 4Iteration 5 Iteration 6 Iteration 7 Iteration 8 Iteration 9 Iteration … GET CRAZY Iteration n Order Payment Customer Report0 码力 | 33 页 | 7.85 MB | 1 年前3Go 101 (Golang 101) v1.21.0
characteristics of Go: fast compilation results in happy local development experience and short deployment iteration cycles flexible, like dynamic languages built-in concurrent programming support All the above advantages statements to end a loop step in advance in a loop control flow block, i.e. continue to the next iteration of the loop. Please note, each of the above mentioned control flow blocks is a statement, and it // use key and element ... } where for and range are two keywords, key and element are called iteration variables. If aContainer is a slice or an array (or an array pointer, see below), then the type0 码力 | 610 页 | 945.17 KB | 1 年前3Go 101 (Golang 101) v1.21.0
characteristics of Go: fast compilation results in happy local development experience and short deployment iteration cycles flexible, like dynamic languages built-in concurrent programming support All the above advantages statements to end a loop step in advance in a loop control flow block, i.e. continue to the next iteration of the loop. Please note, each of the above mentioned control flow blocks is a statement, and it // use key and element ... } where for and range are two keywords, key and element are called iteration variables. If aContainer is a slice or an array (or an array pointer, see below), then the type0 码力 | 880 页 | 833.34 KB | 1 年前3Go 101 (Golang 101) v1.21.0
of Go 11 fast compilation results in happy local development experience and short deployment iteration cycles flexible, like dynamic languages built-in concurrent programming support All the above statements to end a loop step in advance in a loop control flow block, i.e. continue to the next iteration of the loop. Please note, each of the above mentioned control flow blocks is a statement, and it use key and element ... } where for and range are two keywords, key and element are called iteration variables. If aContainer is a slice or an array (or an array pointer, see below), then the type0 码力 | 630 页 | 3.77 MB | 1 年前3Jinja2 Documentation Release 2.10
mainly useful if you are streaming big templates to a client via WSGI which flushes after each iteration. disable_buffering() Disable the output buffering. dump(fp, encoding=None, errors=’strict’) UndefinedError: 'foo' is undefined class jinja2.StrictUndefined An undefined that barks on print and iteration as well as boolean tests and all kinds of comparisons. In other words: you can do nothing with it the error raising automatically. Here a class that works like the regular Undefined but chokes on iteration: class NonIterableUndefined(Undefined): __iter__ = Undefined._fail_with_undefined_error 2.7 The0 码力 | 148 页 | 475.08 KB | 1 年前3《Efficient Deep Learning Book》[EDL] Chapter 7 - Automation
create_model(size=layer_size) opt = optimizers.SGD(learning_rate=learning_rate) losses = [] for iteration in range(2000): with tf.GradientTape() as tape: output = model(X) loss = tf.reduce_mean(tf.math search space. The red areas correspond to lower validation errors. The points are labeled with the iteration number indicating that the algorithm adaptively chooses configurations with lower validation errors trials in an iteration are allocated an identical budget. The configurations are promoted to the next iteration based on an evaluation criteria such that some of them are discarded in each iteration. The search0 码力 | 33 页 | 2.48 MB | 1 年前3
共 878 条
- 1
- 2
- 3
- 4
- 5
- 6
- 88