A Crash Course in Calendars, Dates, Time, and Time Zones Compile-Time Rational Numbers Durations Clocks Time Points Dates Time Zones4 Agenda Compile-Time Rational Numbers Durations Clocks Time Points Dates Time Zones5 Compile-Time Rational Numbers Defined in Work with rational numbers at compile time Always normalized representation Needed for durations in the library6 Compile-Time Compile-Time Rational Numbers Define a rational number: using r1 = ratio<1, 60>; // Represents 1/60 Retrieve numerator and denominator intmax_t num { r1::num }; intmax_t den { r1::den }; cout 0 码力 | 43 页 | 551.60 KB | 6 月前3
Visualize Time Enabled Data using ArcGIS Qt (C++) and ToolkitGela Malek Pour gmalekpour@esri.com Visualize Time Enabled Data using ArcGIS Qt (C++) and ToolkitAbout Esri • We build mapping technology that our customers use to solve the world’s most complex challenges around the worldPurpose of this talk • Showcase a quick way to create a desktop app to visualize time enabled data • Setup the development environment using Esri templates • Use the ArcGIS toolkit to feature layer that include hurricane data as features • Each feature has a specific start time and end time in the feature table • We will use these start and end date values to draw and clear features0 码力 | 10 页 | 734.09 KB | 6 月前3
CeresDB Rust 生产实践 任春韶s-and-blocking-code However, this kind of swapping can only happen at .await points, so code that spends a long time without reaching an .await will prevent other tasks from running. 生产实践 – Future com/chunshao90/tokio-preemption However, this kind of swapping can only happen at .await points, so code that spends a long time without reaching an .await will prevent other tasks from running. 生产实践 –0 码力 | 22 页 | 6.95 MB | 1 年前3
Working with Asynchrony Generically: A Tour of C++ ExecutorsRECEIVER OPERATION STATE connect start …operation completes… … and notifies receiver … time passes… Implementation details of some algorithm; e.g., then. then(sender, fn) -> sender22 SHAPE state start33 OPERATIONS EXECUTE OUTSIDE-IN Receiver Work is scheduled on the thread pool Time passes…. A thread in the pool picks up the work and executes it34 OPERATIONS EXECUTE OUTSIDE-IN Senders65 NO DETACHED COMPUTATION ALLOWED schedul e schedul e then then then schedul e when_al l time set_valu e set_valu e detached computation set_erro r set_erro r A thread in the thread0 码力 | 121 页 | 7.73 MB | 6 月前3
hazard pointer synchronous reclamationSRC == A clear HP 2 3 6 if HP != A HP Safe to delete A A 7 8 SAFE ACCESS If a hazard pointer points to an object before its removal, then the object will not be reclaimed Supports arbitrary protection duration (e.g., the user-defined fn is allowed to block or take long time) Asynchronous Reclamation • Asynchronous reclamation is invoked when the number of retired objects proposal. Require less committee time. • Cohorts: • High confidence in usefulness based on Folly experience. • Why not C++26? Maybe. But unlikely. Complex wording takes committee time. • Global cleanup? • As in0 码力 | 31 页 | 856.38 KB | 6 月前3
RustBelt - Rust 的形式化语义模型= 4} {True} loop {} {False} Hoare Logic Logics P: x ↦ v Ownership We own “x”, and “x” points to “v”. Disjointness Given “(x ↦ v) ∗ (y ↦ w)”, we know that “x ≠ y”, i.e., they do not alias ⟦own τ⟧.own(v̄) := ∗ ∃.ℓ ↦ ∗ ⟦τ ⟧.own() ∗ “ℓ” points to a value of type “τ”; We can deallocate “ℓ”; It owns a location value “ℓ”; “ℓ” points to a value of type “τ”; ∗¿full ⟦? ⟧ (∃?.ℓ↦ ?∗⟦ “ℓ”; : partially owned (.i.e. can alias) ? ⟦rc τ⟧.own(v̄) ∗∃ ? ∈ ℤ+¿ ,? . ℓ↦ [? ]++? ¿ := “ℓ” points to a tuple of a counter “c” and data “w̄ ” cnt data ℓ Rc? Another Rc ℓ However, multiple 0 码力 | 21 页 | 2.63 MB | 1 年前3
使用硬件加速Tokio - 戴翔(incl. pthread, co-routines). • Channel allows a unidirectional flow of information between two end-points: the Sender and the Receiver. • Channel Type: SPSC, SPMC, MPMC, MPSC. Senders Receive Senders0 码力 | 17 页 | 1.66 MB | 1 年前3
C++20's 12 C++20’sCalendars and Time Zones in MSVC Miya Natsuhara ("MEE-yuh Not-soo-HAR-uh") Miya.Natsuhara@microsoft.com Software Engineer, Visual C++ LibrariesWelcome to CppCon 2021! Join Seconds • What are leap seconds? • How did we implement them in MSVC? • Part V: Time Zones • Overview of [time.zone] • IANA database challenges • Part VI: Conclusion7 Part I: Development Process8 • Code Review Videos! • clocks, clock_cast, leap_seconds (https://youtu.be/WX3OmVu4lAs) • time_zone and time_zone_link (https://youtu.be/MODhhr7m-5s) • system_clock::now(), file_clock, leap second awareness 0 码力 | 55 页 | 8.67 MB | 6 月前3
C++20: An (Almost) Complete OverviewnumberOfValues) { for (int i { startValue }; i < startValue + numberOfValues; ++i) { time_t t { system_clock::to_time_t(system_clock::now()) }; cout << std::ctime(&t); co_yield i; } } int main() Concepts Named requirements to constrain template parameters Predicates evaluated at compile time21 Concepts Example of a concept definition: templateconcept Incrementable = requires(T atomic_shared_ptr head; // in C++11: remove "atomic_" and use special // functions every time you touch head public: class reference { shared_ptr p; }; auto find(T 0 码力 | 85 页 | 512.18 KB | 6 月前3
C++20 STL Features: 1 Year of Development on GitHubin_range(T t) noexcept;11 constexpr Algorithms12 C++20 constexpr Everything • constexpr enables compile-time programming without arcane templates • Algorithms: • P0202R3 constexprAnd exchange() Example: lookup tables • Everyone uses lookup tables • Arrays are maximally space-efficient, very time-efficient • Sorted arrays: binary_search, lower_bound, equal_range • Now you can use constexpr algorithms More advanced: constexpr sort your lookup tables14 static_assert is_sorted • Compile-time evaluation = no run-time codegen, even in debug builds #include #include #include 0 码力 | 45 页 | 702.09 KB | 6 月前3
共 29 条
- 1
- 2
- 3
相关搜索词
CrashCourseinCalendarsDatesTimeandZonesVisualizeEnabledDatausingArcGISQtC++Toolkit任春韶2023RustChinaConfceresdbrust生产实践生产实践WorkingwithAsynchronyGenericallyTourofExecutorshazardpointersynchronousreclamation王俊吉RustConf2023RustBelt戴翔使用硬件加速硬件加速Tokio20ChronoAnAlmostCompleteOverviewSTLFeaturesYearDevelopmentonGitHub













