Are you over 18 and want to see adult content?
More Annotations
![A complete backup of realtysystems.ru](https://www.archivebay.com/archive2/49d98115-c43a-4371-8d47-2a95aeb20cfb.png)
A complete backup of realtysystems.ru
Are you over 18 and want to see adult content?
![A complete backup of stiftungfriedenstein.de](https://www.archivebay.com/archive2/c867d1d7-2e9f-4cbc-87c2-332230f63f6f.png)
A complete backup of stiftungfriedenstein.de
Are you over 18 and want to see adult content?
![A complete backup of natural-medicine.ru](https://www.archivebay.com/archive2/5c8aaa0a-718c-47ba-af50-d2777d67b797.png)
A complete backup of natural-medicine.ru
Are you over 18 and want to see adult content?
![A complete backup of godoctorofff.com](https://www.archivebay.com/archive2/24d1b338-148b-43a9-bdf7-583ff93da20b.png)
A complete backup of godoctorofff.com
Are you over 18 and want to see adult content?
Favourite Annotations
![A complete backup of cite-tapisserie.fr](https://www.archivebay.com/archive5/images/fe361cba-e23f-4005-a4a3-1e43db2cffde.png)
A complete backup of cite-tapisserie.fr
Are you over 18 and want to see adult content?
![A complete backup of myrustybucket.com](https://www.archivebay.com/archive5/images/c6d9becd-ed9a-4f84-bfba-f37b92b4befe.png)
A complete backup of myrustybucket.com
Are you over 18 and want to see adult content?
![A complete backup of toastmastersclubs.org](https://www.archivebay.com/archive5/images/3bc9c475-df97-481a-8b91-2827d47b26f1.png)
A complete backup of toastmastersclubs.org
Are you over 18 and want to see adult content?
Text
ABOUT THIS BLOG
About This Blog. Hi, I’m Jeff Preshing, Canadian computer programmer. Looks like you’ve found my blog. This is where I write about programming-related stuff. I try to keep it technical, and tend to focus on C++ and Python, but these aren’t strict rules. You could say the main theme throughout this blog is a reverence and fascinationfor
HOW TO BUILD A CMAKE-BASED PROJECT CMake is a versatile tool that helps you build C/C++ projects on just about any platform you can think of. It’s used by many popular open source projects including LLVM, Qt, KDE and Blender. All CMake-based projects contain a script named CMakeLists.txt, and this post is meant as a guide for configuring and building such projects.This post won’t show you how to write a CMake script HOW C++ RESOLVES A FUNCTION CALL XKCD PASSWORD GENERATOR xkcd Password Generator. The button below will generate a random phrase consisting of four common words. According to yesterday’s xkcd strip, such phrases are hard to guess (even by brute force), but easy to remember, making them interesting password choices. AN INTRODUCTION TO LOCK-FREE PROGRAMMING A FLEXIBLE REFLECTION SYSTEM IN C++: PART 2 IMPLEMENTING A RECURSIVE MUTEX AUTO_LOCK_MACRO is, of course, one of those funky C++ macros which obtains the lock and automatically unlocks it when we exit the function scope.. As you can see, if we pass NULL to Realloc, the lock will be obtained once by the Realloc function, and a second time (recursively) when Alloc is called. Obviously, it would be very easy to modify this particular example to avoid the recursive lock HASH COLLISION PROBABILITIES Subtract it from one, and you have the probability of a hash collision: 1 − e − k ( k − 1) 2 N. Here is a graph for N = 2 32 . This illustrates the probability of collision when using 32-bit hash values. It’s worth noting that a 50% chance of collision occurs when the number of hashes is 77163. Also note that the graph takes the sameS
A FLEXIBLE REFLECTION SYSTEM IN C++: PART 1 PRESHING ON PROGRAMMINGHOW TO INSTALL THE LATEST GCC ON WINDOWSACQUIRE AND RELEASE SEMANTICS A write-release operation cannot be reordered with any read or write operation that precedes it in program order. Those rules don’t prevent the reordering of a write-release followed by a read-acquire. For example, in C++, if A and B are std::atomic, and we write: A.store ( 1, std::memory_order_release); int b = B.load (std::memory_orderABOUT THIS BLOG
About This Blog. Hi, I’m Jeff Preshing, Canadian computer programmer. Looks like you’ve found my blog. This is where I write about programming-related stuff. I try to keep it technical, and tend to focus on C++ and Python, but these aren’t strict rules. You could say the main theme throughout this blog is a reverence and fascinationfor
HOW TO BUILD A CMAKE-BASED PROJECT CMake is a versatile tool that helps you build C/C++ projects on just about any platform you can think of. It’s used by many popular open source projects including LLVM, Qt, KDE and Blender. All CMake-based projects contain a script named CMakeLists.txt, and this post is meant as a guide for configuring and building such projects.This post won’t show you how to write a CMake script HOW C++ RESOLVES A FUNCTION CALL XKCD PASSWORD GENERATOR xkcd Password Generator. The button below will generate a random phrase consisting of four common words. According to yesterday’s xkcd strip, such phrases are hard to guess (even by brute force), but easy to remember, making them interesting password choices. AN INTRODUCTION TO LOCK-FREE PROGRAMMING A FLEXIBLE REFLECTION SYSTEM IN C++: PART 2 IMPLEMENTING A RECURSIVE MUTEX AUTO_LOCK_MACRO is, of course, one of those funky C++ macros which obtains the lock and automatically unlocks it when we exit the function scope.. As you can see, if we pass NULL to Realloc, the lock will be obtained once by the Realloc function, and a second time (recursively) when Alloc is called. Obviously, it would be very easy to modify this particular example to avoid the recursive lock HASH COLLISION PROBABILITIES Subtract it from one, and you have the probability of a hash collision: 1 − e − k ( k − 1) 2 N. Here is a graph for N = 2 32 . This illustrates the probability of collision when using 32-bit hash values. It’s worth noting that a 50% chance of collision occurs when the number of hashes is 77163. Also note that the graph takes the sameS
A FLEXIBLE REFLECTION SYSTEM IN C++: PART 1 PRESHING ON PROGRAMMING A write-release operation cannot be reordered with any read or write operation that precedes it in program order. Those rules don’t prevent the reordering of a write-release followed by a read-acquire. For example, in C++, if A and B are std::atomic, and we write: A.store ( 1, std::memory_order_release); int b = B.load (std::memory_order IMPLEMENTING A RECURSIVE MUTEX AUTO_LOCK_MACRO is, of course, one of those funky C++ macros which obtains the lock and automatically unlocks it when we exit the function scope.. As you can see, if we pass NULL to Realloc, the lock will be obtained once by the Realloc function, and a second time (recursively) when Alloc is called. Obviously, it would be very easy to modify this particular example to avoid the recursive lock HOW TO INSTALL THE LATEST GCC ON WINDOWS 3. Download, Build and Install the Latest GCC. Open a Cygwin terminal, either from the Start menu or by running Cygwin.bat from the Cygwin installation folder. If your machine is located behind a proxy server, you must run the following command from the Cygwin terminal before proceeding – otherwise, wget won’t work. ATOMIC VS. NON-ATOMIC OPERATIONS Atomic vs. Non-Atomic Operations. Much has already been written about atomic operations on the web, usually with a focus on atomic read-modify-write (RMW) operations. However, those aren’t the only kinds of atomic operations. There are also atomic loads and stores, which are equally important. In this post, I’ll compare atomic loadsand
ACQUIRE AND RELEASE SEMANTICS Acquire semantics prevent memory reordering of the read-acquire with any read or write operation that follows it in program order. Release semantics is a property that can only apply to operations that write to shared memory, whether they are read-modify-write operations or plain stores. The operation is then considered a write-release. HERE'S A STANDALONE CAIRO DLL FOR WINDOWS Here's a Standalone Cairo DLL for Windows. Cairo is an open source C library for drawing vector graphics. I used it to create many of the diagrams and graphs on this blog. Cairo is great, but it’s always been difficult to find a precompiled Windows DLL that’s up-to-date and that doesn’t depend on a bunch of other DLLs. MEMORY ORDERING AT COMPILE TIME Memory Ordering at Compile Time. Between the time you type in some C/C++ source code and the time it executes on a CPU, the memory interactions of that code may be reordered according to certain rules. Changes to memory ordering are made both by the compiler (at compile time) and by the processor (at run time), all in the name of makingyour
A LOOK BACK AT SINGLE-THREADED CPU PERFORMANCE A Look Back at Single-Threaded CPU Performance. Throughout the 80’s and 90’s, CPUs were able to run virtually any kind of software twice as fast every 18-20 months. The rate of change was incredible. Your 486SX-16 was almost obsolete by the time you got it through the door. But eventually, at some point in the mid-2000’s, progress slowed ROLL YOUR OWN LIGHTWEIGHT MUTEX This implementation also serves as a convenient introduction to atomics, which are at the heart of many lock-free algorithms. _InterlockedIncrement is an atomic read-modify-write (RMW) operation on Win32. If multiple threads attempt an atomic RMW at the same time, on the same piece of data, they will all line up in a row and executeone-at-a-time.
HOW TO GENERATE A SEQUENCE OF UNIQUE RANDOM INTEGERS Suppose we wish to generate a sequence of 10000000 random 32-bit integers with no repeats.How can we do it? I faced this problem recently, and considered several options before finally implementing a custom, non-repeating pseudo-random number generator which runs in O(1) time, requires just 8 bytes of storage, and has pretty gooddistribution.
ABOUT THIS BLOG
About This Blog. Hi, I’m Jeff Preshing, Canadian computer programmer. Looks like you’ve found my blog. This is where I write about programming-related stuff. I try to keep it technical, and tend to focus on C++ and Python, but these aren’t strict rules. You could say the main theme throughout this blog is a reverence and fascinationfor
IMPLEMENTING A RECURSIVE MUTEX As in the original Benaphore, the first thread to call Lock will take ownership without making any expensive kernel calls. It also performs some bookkeeping: It sets m_owner to its own TID, and m_recursion becomes 1. If the same thread calls Lock again, it will increment both m_counter and m_recursion.. Correspondingly, when the same thread calls Unlock, it will decrement both m_counter AN INTRODUCTION TO LOCK-FREE PROGRAMMING A FLEXIBLE REFLECTION SYSTEM IN C++: PART 2 ACQUIRE AND RELEASE FENCES First things first: Acquire and release fences are considered low-level lock-free operations. If you stick with higher-level, sequentially consistent atomic types, such as volatile variables in Java 5+, or default atomics in C++11, you don’t need acquire and release fences. The tradeoff is that sequentially consistent types areslightly less
XKCD PASSWORD GENERATOR xkcd Password Generator. The button below will generate a random phrase consisting of four common words. According to yesterday’s xkcd strip, such phrases are hard to guess (even by brute force), but easy to remember, making them interesting password choices. A FLEXIBLE REFLECTION SYSTEM IN C++: PART 1 BITCOIN ADDRESS GENERATOR IN OBFUSCATED PYTHON Recently, I became interested in the inner workings of Bitcoin – specifically, the way it uses elliptic curve cryptography to generate Bitcoin addresses such as ACQUIRE AND RELEASE SEMANTICS Acquire semantics prevent memory reordering of the read-acquire with any read or write operation that follows it in program order. Release semantics is a property that can only apply to operations that write to shared memory, whether they are read-modify-write operations or plain stores. The operation is then considered a write-release. HERE'S A STANDALONE CAIRO DLL FOR WINDOWS Here's a Standalone Cairo DLL for Windows. Cairo is an open source C library for drawing vector graphics. I used it to create many of the diagrams and graphs on this blog. Cairo is great, but it’s always been difficult to find a precompiled Windows DLL that’s up-to-date and that doesn’t depend on a bunch of other DLLs.ABOUT THIS BLOG
About This Blog. Hi, I’m Jeff Preshing, Canadian computer programmer. Looks like you’ve found my blog. This is where I write about programming-related stuff. I try to keep it technical, and tend to focus on C++ and Python, but these aren’t strict rules. You could say the main theme throughout this blog is a reverence and fascinationfor
IMPLEMENTING A RECURSIVE MUTEX As in the original Benaphore, the first thread to call Lock will take ownership without making any expensive kernel calls. It also performs some bookkeeping: It sets m_owner to its own TID, and m_recursion becomes 1. If the same thread calls Lock again, it will increment both m_counter and m_recursion.. Correspondingly, when the same thread calls Unlock, it will decrement both m_counter AN INTRODUCTION TO LOCK-FREE PROGRAMMING A FLEXIBLE REFLECTION SYSTEM IN C++: PART 2 ACQUIRE AND RELEASE FENCES First things first: Acquire and release fences are considered low-level lock-free operations. If you stick with higher-level, sequentially consistent atomic types, such as volatile variables in Java 5+, or default atomics in C++11, you don’t need acquire and release fences. The tradeoff is that sequentially consistent types areslightly less
XKCD PASSWORD GENERATOR xkcd Password Generator. The button below will generate a random phrase consisting of four common words. According to yesterday’s xkcd strip, such phrases are hard to guess (even by brute force), but easy to remember, making them interesting password choices. A FLEXIBLE REFLECTION SYSTEM IN C++: PART 1 BITCOIN ADDRESS GENERATOR IN OBFUSCATED PYTHON Recently, I became interested in the inner workings of Bitcoin – specifically, the way it uses elliptic curve cryptography to generate Bitcoin addresses such as ACQUIRE AND RELEASE SEMANTICS Acquire semantics prevent memory reordering of the read-acquire with any read or write operation that follows it in program order. Release semantics is a property that can only apply to operations that write to shared memory, whether they are read-modify-write operations or plain stores. The operation is then considered a write-release. HERE'S A STANDALONE CAIRO DLL FOR WINDOWS Here's a Standalone Cairo DLL for Windows. Cairo is an open source C library for drawing vector graphics. I used it to create many of the diagrams and graphs on this blog. Cairo is great, but it’s always been difficult to find a precompiled Windows DLL that’s up-to-date and that doesn’t depend on a bunch of other DLLs. PRESHING ON PROGRAMMING A write-release operation cannot be reordered with any read or write operation that precedes it in program order. Those rules don’t prevent the reordering of a write-release followed by a read-acquire. For example, in C++, if A and B are std::atomic, and we write: A.store ( 1, std::memory_order_release); int b = B.load (std::memory_order XKCD PASSWORD GENERATOR xkcd Password Generator. The button below will generate a random phrase consisting of four common words. According to yesterday’s xkcd strip, such phrases are hard to guess (even by brute force), but easy to remember, making them interesting password choices. THE HAPPENS-BEFORE RELATION Happens-before is a modern computer science term which is instrumental in describing the software memory models behind C++11, Java, Go and even LLVM.. You’ll find a definition of the happens-before relation in the specifications of each of the above languages. Conveniently, the definitions given in those specifications are basically the same, though each specification has a different way of HOW TO BUILD A CMAKE-BASED PROJECT CMake is a versatile tool that helps you build C/C++ projects on just about any platform you can think of. It’s used by many popular open source projects including LLVM, Qt, KDE and Blender. All CMake-based projects contain a script named CMakeLists.txt, and this post is meant as a guide for configuring and building such projects.This post won’t show you how to write a CMake script HOW C++ RESOLVES A FUNCTION CALL How C++ Resolves a Function Call. C is a simple language. You’re only allowed to have one function with each name. C++, on the other hand, gives you much more flexibility: You can have multiple functions with the same name ( overloading ). You can overload built-in operators like + and ==. HASH COLLISION PROBABILITIES Subtract it from one, and you have the probability of a hash collision: 1 − e − k ( k − 1) 2 N. Here is a graph for N = 2 32 . This illustrates the probability of collision when using 32-bit hash values. It’s worth noting that a 50% chance of collision occurs when the number of hashes is 77163. Also note that the graph takes the sameS
ACQUIRE AND RELEASE SEMANTICS Acquire semantics prevent memory reordering of the read-acquire with any read or write operation that follows it in program order. Release semantics is a property that can only apply to operations that write to shared memory, whether they are read-modify-write operations or plain stores. The operation is then considered a write-release. ROLL YOUR OWN LIGHTWEIGHT MUTEX This implementation also serves as a convenient introduction to atomics, which are at the heart of many lock-free algorithms. _InterlockedIncrement is an atomic read-modify-write (RMW) operation on Win32. If multiple threads attempt an atomic RMW at the same time, on the same piece of data, they will all line up in a row and executeone-at-a-time.
PENROSE TILING EXPLAINED Penrose Tiling Explained. Last week, I posted some obfuscated Python which generates Penrose tiling. Today, I’ll explain the basic algorithm behind that Python script, and share the non-obfuscated version. The algorithm manipulates a list of red and blue isosceles triangles. Each red triangle has a 36° angle at its apex, while eachblue
MEMORY ORDERING AT COMPILE TIME Memory Ordering at Compile Time. Between the time you type in some C/C++ source code and the time it executes on a CPU, the memory interactions of that code may be reordered according to certain rules. Changes to memory ordering are made both by the compiler (at compile time) and by the processor (at run time), all in the name of makingyour
ABOUT THIS BLOG
Hi, I’m Jeff Preshing, Canadian computer programmer. Looks like you’ve found my blog. This is where I write about programming-related stuff. I try to keep it technical, and tend to focus on C++ and Python, but these aren’t strict rules. You could say the main theme throughout this blog is a IMPLEMENTING A RECURSIVE MUTEX As in the original Benaphore, the first thread to call Lock will take ownership without making any expensive kernel calls. It also performs some bookkeeping: It sets m_owner to its own TID, and m_recursion becomes 1. If the same thread calls Lock again, it will increment both m_counter and m_recursion.. Correspondingly, when the same thread calls Unlock, it will decrement both m_counter AN INTRODUCTION TO LOCK-FREE PROGRAMMING A FLEXIBLE REFLECTION SYSTEM IN C++: PART 2SEE MORE ON PRESHING.COM A FLEXIBLE REFLECTION SYSTEM IN C++: PART 1SEE MORE ON PRESHING.COM ACQUIRE AND RELEASE FENCES Now, if TryReceiveMessage happens to see the write which SendTestMessage performed on g_guard, then it will issue the acquire fence, and the synchronizes-with relationship is complete. Again, strictly speaking, it’s the fences which synchronize-with each other.. Let’s back up for a moment and consider this example in terms of the source control analogy I made a while back. BITCOIN ADDRESS GENERATOR IN OBFUSCATED PYTHON Recently, I became interested in the inner workings of Bitcoin – specifically, the way it uses elliptic curve cryptography to generate Bitcoin addresses such as XKCD PASSWORD GENERATOR The button below will generate a random phrase consisting of four common words. According to yesterday’s xkcd strip, such phrases are hard to guess (even by brute force), but easy to remember, making them interesting password choices.ABOUT THIS BLOG
Hi, I’m Jeff Preshing, Canadian computer programmer. Looks like you’ve found my blog. This is where I write about programming-related stuff. I try to keep it technical, and tend to focus on C++ and Python, but these aren’t strict rules. You could say the main theme throughout this blog is a IMPLEMENTING A RECURSIVE MUTEX As in the original Benaphore, the first thread to call Lock will take ownership without making any expensive kernel calls. It also performs some bookkeeping: It sets m_owner to its own TID, and m_recursion becomes 1. If the same thread calls Lock again, it will increment both m_counter and m_recursion.. Correspondingly, when the same thread calls Unlock, it will decrement both m_counter AN INTRODUCTION TO LOCK-FREE PROGRAMMING A FLEXIBLE REFLECTION SYSTEM IN C++: PART 2SEE MORE ON PRESHING.COM A FLEXIBLE REFLECTION SYSTEM IN C++: PART 1SEE MORE ON PRESHING.COM ACQUIRE AND RELEASE FENCES Now, if TryReceiveMessage happens to see the write which SendTestMessage performed on g_guard, then it will issue the acquire fence, and the synchronizes-with relationship is complete. Again, strictly speaking, it’s the fences which synchronize-with each other.. Let’s back up for a moment and consider this example in terms of the source control analogy I made a while back. BITCOIN ADDRESS GENERATOR IN OBFUSCATED PYTHON Recently, I became interested in the inner workings of Bitcoin – specifically, the way it uses elliptic curve cryptography to generate Bitcoin addresses such as XKCD PASSWORD GENERATOR The button below will generate a random phrase consisting of four common words. According to yesterday’s xkcd strip, such phrases are hard to guess (even by brute force), but easy to remember, making them interesting password choices. ACQUIRE AND RELEASE SEMANTICS Generally speaking, in lock-free programming, there are two ways in which threads can manipulate shared memory: They can compete with each other for a resource, or they can pass information co-operatively from one thread to another.Acquire and release semantics are crucial for the latter: reliable passing of information between threads. In fact, I would venture to guess that incorrect HERE'S A STANDALONE CAIRO DLL FOR WINDOWS Cairo is an open source C library for drawing vector graphics. I used it to create many of the diagrams and graphs on this blog. Cairo is great, but it’s always been difficult to find a precompiled Windows DLL that’s up-to-date and that doesn’t depend on a bunch of otherDLLs.
HOW C++ RESOLVES A FUNCTION CALL C is a simple language. You’re only allowed to have one function with each name. C++, on the other hand, gives you much more flexibility: You can have multiple functions with the same name (overloading).You can overload built-in operators like + and ==.; You can write function templates.; Namespaces help you avoid naming conflicts.; I like these C++ features. HOW TO BUILD A CMAKE-BASED PROJECT CMake is a versatile tool that helps you build C/C++ projects on just about any platform you can think of. It’s used by many popular open source projects including LLVM, Qt, KDE and Blender. All CMake-based projects contain a script named CMakeLists.txt, and this post is meant as a guide for configuring and building such projects.This post won’t show you how to write a CMake script THE HAPPENS-BEFORE RELATION Happens-before is a modern computer science term which is instrumental in describing the software memory models behind C++11, Java, Go and even LLVM.. You’ll find a definition of the happens-before relation in the specifications of each of the above languages. Conveniently, the definitions given in those specifications are basically the same, though each specification has a different way of XKCD PASSWORD GENERATOR The button below will generate a random phrase consisting of four common words. According to yesterday’s xkcd strip, such phrases are hard to guess (even by brute force), but easy to remember, making them interesting password choices. ACQUIRE AND RELEASE SEMANTICS Generally speaking, in lock-free programming, there are two ways in which threads can manipulate shared memory: They can compete with each other for a resource, or they can pass information co-operatively from one thread to another.Acquire and release semantics are crucial for the latter: reliable passing of information between threads. In fact, I would venture to guess that incorrect ROLL YOUR OWN LIGHTWEIGHT MUTEX This implementation also serves as a convenient introduction to atomics, which are at the heart of many lock-free algorithms. _InterlockedIncrement is an atomic read-modify-write (RMW) operation on Win32. If multiple threads attempt an atomic RMW at the same time, on the same piece of data, they will all line up in a row and executeone-at-a-time.
MEMORY ORDERING AT COMPILE TIME Imagine what would happen if the compiler reordered the store to IsPublished before the store to Value.Even on a single-processor system, we’d have a problem: a thread could very well be pre-empted by the operating system between the two stores, leaving other threads to believe that Value has been updated when in fact, it hasn’t.. Of course, the compiler might not reorder those operations ATOMIC VS. NON-ATOMIC OPERATIONS You’ll notice that both the Mintomic and C++11 examples use relaxed atomics, as evidenced by the _relaxed suffix on various identifiers. The _relaxed suffix is a reminder that few guarantees are made about memory ordering.. In particular, it is still legal for the memory effects of a relaxed atomic operation to be reordered with respect to instructions which follow or precede it in program C++ HAS BECOME MORE PYTHONIC When you call functions that are overloaded for several types, such as std::ostream::operatorDetails
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0