CurveFS S3本地缓存盘方案(); /** * @brief tell whether the obj is cached in local cache disk. */ bool IsCached(std::string name); void addCache(std::string name); /** * @brief tell whether the cache /**© XXX Page 5 of 9 * @brief trim cache func. */ void TrimCache(); /** * @brief: start trim thread. */ void TrimRun(); /** * @brief: stop trim thread. */ std::string fileName, const char* buf, uint64_t length);© XXX Page 6 of 9 /** * @brief Create Disk Write Cache Dir. */ int CreateDir(const std::string cacheDir); bool IsDirExist(const0 码力 | 9 页 | 150.46 KB | 6 月前3
Back to Basics: Algebraic Data Typesthere are commonalities between std::any and the algebraic types. 18Quick motivationWhy use pair? (brief version) pair is used many places in the classic STL. using M = std::map; M myMap = {{1 Returned from some algorithms, like mismatch, equal_range, and uninitialized_move_n.Why use tuple? (brief version) Since the STL uses pair to simulate “returning multiple results,” you might imagine returning minmax_result { T min; T max; }; and I recommend you do the same in your code.Why use tuple? (brief version) tuple is used (arcanely) to forward sets of arguments to pair’s constructor. More on this 0 码力 | 73 页 | 267.05 KB | 6 月前3
Just-in-Time Compilation - J F Bastien - CppCon 2020are condemned to repeat it. Bartlett, J. 1992. Familiar Quotations (16th ed.) Aycock, J. 2003. A Brief History of Just-In-Time Bastien, JF. 2020. CppCon—Just-in-Time compilation Van Eerd, T. 2021. CppCon—SOLID is to expand our minds regarding what’s possible with compilers. Let’s look at our first paper…A Brief History of Just-in-Time Software systems have been using “just-in-time” compilation (JiT) techniques and present a classification scheme for such systems. — 2003 Let’s start with our first paper.A Brief History of Just-in-Time Software systems have been using “just-in-time” compilation (JiT) techniques0 码力 | 111 页 | 3.98 MB | 6 月前3
Curve文件系统空间分配方案public: Allocator(...) {} virtual ~Allocator() = default;© XXX Page 10 of 11 /** * @brief * * @param size * @param allocateHint * @param extents * @return uint64_t /** * @brief */ virtual void Deallocate(const Extents& extents) = 0; /** * @brief */ virtual bool MarkUsed(const Extents& extents) = 0; /** * @brief */ */ virtual bool MarkUsable(const Extents& extents) = 0; /** * @brief© XXX Page 11 of 11 */ virtual uint64_t TotalFree() const = 0; }; MarkUsed和MarkFree是持久化层调用,对分配器进行初始化。0 码力 | 11 页 | 159.17 KB | 6 月前3
Applicative: The Forgotten Functional PatternBegin Not To Understand The mechanics of Applicative Applicative in C++ 22A VERY BRIEF SURVEY OF EXISTING A VERY BRIEF SURVEY OF EXISTING WORK WORK (Michał Dominiak, CppCon 2015) (David Sankel, C++Now (Just 1) <*> (Just 2) -- => Just 3 pure (+) <*> (Just 1) -- => Just (+1) 30A VERY BRIEF SURVEY OF EXISTING A VERY BRIEF SURVEY OF EXISTING C++ WORK C++ WORK P0650 (C++ Monadic Interface, Vicente J. Botet0 码力 | 141 页 | 11.33 MB | 6 月前3
Writing Python Bindings for C++ Libraries: Easy-to-use PerformanceLibrary’s core written in C, the ndarray type and various common operations on it are implemented in C Brief overview of NumPy In [7]: x = np.array([6, 7, 8]); print("{}, {}".format(type(x), x.dtype))Brief overview of NumPyLet’s design a n-dimensional array (brief) How would you design a library exposing an API to an n-dimensional 0 码力 | 118 页 | 2.18 MB | 6 月前3
Back To Basics Functionshave addresses (they must after all!) and that we can store functions in pointers. We'll take a brief aside to show you how modern C++ also gives us the convenient std::function. Functions need not always hopefully you think in terms of functions as building blocks that you can compose together ● Brief aside -- for advanced users -- yes, you can use a variadic template and evaluate this at compile-time hopefully you think in terms of functions as building blocks that you can compose together ● Brief aside -- for advanced users -- yes, you can use a variadic template and evaluate this at compile-time0 码力 | 123 页 | 7.26 MB | 6 月前3
Back to Basics: Concurrencycompeting for a resource I don’t know who these people are??Does our hardware support Concurrency? Brief Architecture History 27Moore’s Law (1/2) 28 ● Around 1965 Gordon Moore predicted the number of readability) ■ Accidentally putting a lock, (or excessive locking) is bad for performance 91(Brief Aside) static in C++11 (and beyond) ● static local variable are guaranteed by the C++11 standard Allow multiple threads to enter ■ Related ideas ● (C++20) std::latch ● (C++20) std::barrier 119Brief Notes on Parallelism Parallelism being the simultaneous execution of threads (often with less thought0 码力 | 141 页 | 6.02 MB | 6 月前3
Unity for Human BeingsPage 51 We are done with the Animator tab, I just wanted to show a brief preview of how the Animator is displayed. Don’t worry, the next section will deal heavily with using Page 52 If you click on the right facing arrow next to 16: Sprite, it will give you a brief preview of the actual images used for this animation. Zenva Academy – Online courses on look at the credits screen. SECTION 3: FLESHING OUT MORE DETAILS Now it is time to go into a brief idea of the game mechanics. As the player plays the game, they must move around on the screen dodging0 码力 | 239 页 | 27.39 MB | 10 月前3
Pipeline Architectures in C++: Overloaded Pipe Operator | and Its Monadic Operations(required): Title and brief overview of what the poster reports on. Title: Pipeline architectures in C++: overloaded pipe operator | std::expected and its monadic operations Brief overview: Functional0 码力 | 3 页 | 422.24 KB | 6 月前3
共 108 条
- 1
- 2
- 3
- 4
- 5
- 6
- 11
相关搜索词













