- And now about my new C++ synchronization objects library.. - 1 Update
- cmsg cancel <ngfrl2$l8q$3@dont-email.me> - 3 Updates
- My C++ synchronization objects library was extended.. - 1 Update
- C++ synchronization objects library was updated.. - 1 Update
- About C++... - 6 Updates
- Template type as member variable? - 3 Updates
- std::find() with easier interface - 1 Update
- What was the reasoning behind &'s syntax? - 3 Updates
Ramine <ramine@1.1>: May 05 06:46PM -0700 Hello, And now about my new C++ synchronization objects library.. I am a guy who specializes in parallel programming. And if you ask me a question about the sequential consistency correctness of my new C++ synchronization objects library.. You have to know that the dynamic link libraries are compiled with FreePascal compiler, and the Freepascal compiler doesn't follow the weak memory model of C++ that is more error prone, but Freepascal compiler doesn't reorder loads and stores as do C++ compilers, so this has easy for me the reasonning on my synchronization algorithms, and my synchronization algorithms of my new C++ synchronization objects library are my inventions, so if you want to look at there Object pascal source code , you can download them from: https://sites.google.com/site/aminer68/ Other than that, you have to know that 4 days ago i didn't know about how to program in C++, so i have read a 500 pages book in two days to learn C++ programming and in the third day and fourth day i have wrote and finished and tested my new C++ synchronization objects library, and i think you can be confident, because sequential consistency correctness is much easier to reason about in FreePascal compiler that doesn't reorder loads and stores, also i have thoroughly tested my inventions that are my synchronization algorithms of my new C++ synchronization objects library. You can download my new extended C++ synchronization objects library from: https://sites.google.com/site/aminer68/c-synchronization-objects-library Thank you, Amine Moulay Ramdane. |
bleachbot <bleachbot@httrack.com>: May 05 06:20PM +0200 |
bleachbot <bleachbot@httrack.com>: May 06 12:12AM +0200 |
bleachbot <bleachbot@httrack.com>: May 06 12:41AM +0200 |
Ramine <ramine@1.1>: May 05 06:14PM -0700 Hello..... My C++ synchronization objects library was extended.. I have just extended my C++ synchronization objects library, i have added two of my scalable reader-writer locks that are amazing, the first is my scalable DRWLock that is a scalable reader-writer lock that is starvation-free and it does spin-wait, and the second is my scalable DRWLockX that is a scalable reader-writer lock that is starvation-free and it doesn't spin-wait, but it waits on the Event objects and my SemaMonitor, so it is energy efficient. So now it is a great C++ synchronization objects library. You can download my new extended C++ synchronization objects library from: https://sites.google.com/site/aminer68/c-synchronization-objects-library Description: This library contains five synchronization objects, first one is my scalable SeqlockX that is a variant of Seqlock that eliminates the weakness of Seqlock that is "livelock"of the readers when there is more writers, and second is my scalable MLock that is a scalable lock , and third is my SemaMonitor that combines all characteristics of a semaphore and an eventcount and also a windows Manual-reset event and also a windows Auto-reset event, and fourth is my scalable DRWLock that is a scalable reader-writer lock that is starvation-free and it does spin-wait, and five is is my scalable DRWLockX that is a scalable reader-writer lock that is starvation-free and it doesn't spin-wait, but it waits on the Event objects and my SemaMonitor, so it is energy efficient. If you take a look at the zip file , you will notice that it contains the DLLs Object pascal source codes, to compile those dynamic link libraries source codes you will have to download my SemaMonitor Object pascal source code and my SeqlockX Object pascal source code and my scalable MLock Object pascal source code and my scalable DRWLock Object pascal source code from here: https://sites.google.com/site/aminer68/ I have compiled and included the 32 bit and 64 bit windows Dynamic Link libraries inside the zip file, if you want to compile the dynamic link libraries for Unix and Linux and OSX on (x86) , please download the source codes of my SemaMonitor and my scalable SeqlockX and my scalable MLock and my scalable DRWLock and compile them yourself. My SemaMonitor of my C++ synchronization objects library is easy to use, it combines all characteristics of a semaphore and an eventcount and also a windows Manual-reset event and also a windows Auto-reset event, here is its C++ interface: class SemaMonitor{ public: SemaMonitor(bool state, long2 InitialCount1=0,long2 MaximumCount1=INFINITE); ~SemaMonitor(); void wait(unsigned long mstime=INFINITE); void signal(); void signal_all(); void signal(long2 nbr); void setSignal(); void resetSignal(); long1 WaitersBlocked(); }; So when you set the first parameter that is state of the constructor to true. it will add the characteristic of a Semaphore to the to the Eventcount, so the signal will not be lost if the threads are not waiting for the SemaMonitor objects, but when you set the first parameter of the construtor to false, it will not behave like a Semaphore because if the threads are not waiting for the SemaCondvar or SemaMonitor the signal will be lost.. the parameters InitialCount1 and MaximumCount1 is the semaphore InitialCount and MaximumCount. The wait() method is for the threads to wait on the SemaMonitor object for the signal to be signaled. and the signal() method will signal one time a waiting thread on the SemaMonitor object. the signal_all() method will signal all the waiting threads on the SemaMonitor object. the signal(long2 nbr) method will signal nbr number of waiting threads the setSignal() and resetSignal() methods behave like the windows Event object's methods that are setEvent() and resetEvent(). and WaitersBlocked() will return the number of waiting threads on the SemaMonitor object. As you have noticed my SemaMonitor is a powerful synchronization object. Please read the readme files inside the zip file to know more about them.. Language: GNU C++ and Visual C++ Operating Systems: Windows, Linux, Unix and OSX on (x86) Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: May 05 12:21PM -0700 Hello... My C++ synchronization objects library was updated.. I have made "BCLoadLib* dll1;" a data member of the class. You can download my new C++ synchronization objects library from: https://sites.google.com/site/aminer68/c-synchronization-objects-library Thank you, Amine Moulay Ramdane. |
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: May 04 11:06PM +0100 On Wed, 4 May 2016 18:03:42 -0400 Jerry Stuckle <jstucklex@attglobal.net> wrote: [snip] > wouldn't let it near any project I worked on, in any language. > But then if the libraries were any good, he wouldn't have to spam > usenet. So that in itself should tell you something. He has a mental condition. Have a look at comp.programming.threads to see what may lie ahead. He has reduced it to ruins. |
Ian Collins <ian-news@hotmail.com>: May 05 10:38AM +1200 On 05/05/16 09:57, Chris Vine wrote: > Ramine <ramine@1.1> wrote: > Please stop posting these repetitive posts. One post would have been > enough. Instead you post 6 times in 1 hour 15 minutes, all most drivel. Please stop replying to Ramine posts! Decent news server already filter them out.... -- Ian Collins |
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: May 04 11:40PM +0100 On Wed, 4 May 2016 23:06:15 +0100 > > usenet. So that in itself should tell you something. > He has a mental condition. Have a look at comp.programming.threads to > see what may lie ahead. He has reduced it to ruins. And on doing some looking up I see this one from him (in his previous incarnation as aminer before being kicked off his then ISP provider): https://groups.google.com/forum/?_escaped_fragment_=topic/comp.programming.threads/MXUMDp708Pk#!topic/comp.programming.threads/MXUMDp708Pk , which included this choice posting on comp.programming.threads: "if you still harrass arabs on this forum i will call 9/11 immediatly. Do you remember the 9/11 you racist and moron ?" I strongly suspect he is not in fact a terrorist thread, just significantly ill. |
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: May 04 11:43PM +0100 On Thu, 5 May 2016 10:38:55 +1200 > > most drivel. > Please stop replying to Ramine posts! Decent news server already > filter them out.... Really? Which one is that? If it gets bad enough I will use a kill file, but I use claws-mail which makes kill files unnecessarily difficult to use. |
Ian Collins <ian-news@hotmail.com>: May 05 12:32PM +1200 On 05/05/16 10:43, Chris Vine wrote: > Really? Which one is that? > If it gets bad enough I will use a kill file, but I use claws-mail > which makes kill files unnecessarily difficult to use. News.Individual.net and, so I hear, several others. -- Ian Collins |
Cholo Lennon <chololennon@hotmail.com>: May 05 09:21AM -0300 On 05/04/2016 07:43 PM, Chris Vine wrote: >> Please stop replying to Ramine posts! Decent news server already >> filter them out.... > Really? Which one is that? In my news server (news.aioe.org) he has been filtered out long ago :-) I only see replies to him. -- Cholo Lennon Bs.As. ARG |
"Heinz-Mario Frühbeis" <Div@Earlybite.individcore.de>: May 05 07:42AM +0200 Am 03.05.2016 um 11:54 schrieb Öö Tiib: > All types given as template argument must be compile-time known to > compiler in C++. For rum-time polymorphism there are base classes > and virtual member functions. Ok, thank you for the information. Regards Heinz-Mario Frühbeis |
"Heinz-Mario Frühbeis" <Div@Earlybite.individcore.de>: May 05 07:44AM +0200 Am 03.05.2016 um 15:29 schrieb Stefan Ram: > template< typename T >void f() > { ::std::cout << typeid( T ).name() << '\n'; } > int main() { f< clazz::membervariable >(); } Currently it "says" nothing to me, but as soon as I find some time I will a look on it and I will answer again. Thanks, sir. Regards Heinz-Mario Frühbeis |
"Heinz-Mario Frühbeis" <Div@Earlybite.individcore.de>: May 05 07:49AM +0200 Am 04.05.2016 um 00:22 schrieb Richard: > Can you explain more the use case of why you would need to do this? > More generally, please describe the goal you are trying to achieve and > why you think this specific task is the way to achieve it. Isn'T it self-declaring? It would simplify coding, nothing more. It would result in less code... Currently I use void* to store a member in a vector and I, if used, cast this void-pointer into a template-function. This works, (IMHO) less coding... I hope it has reached your interest... Til then Heinz-Mario Frühbeis |
legalize+jeeves@mail.xmission.com (Richard): May 04 04:26PM [Please do not mail me a copy of your followup] Ralf Goertz <me@myprovider.invalid> spake the secret code >I find it quite tedious to always have to write >auto it=std::find(v.begin(),v.end(),value); It's coming. <http://ericniebler.com/2014/10/11/n4128-ranges-for-the-standard-library/> -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Computer Graphics Museum <http://computergraphicsmuseum.org> The Terminals Wiki <http://terminals.classiccmp.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: May 04 06:00AM -0700 On Wednesday, May 4, 2016 at 8:50:21 AM UTC-4, David Brown wrote: > conceivable that your @ idea could be so popular that it might be > implemented in real-world C++ compilers, or future C++ standards - but > at best, that would be many years down the line. Again, my amazement comes from the fact that people would think that this alternative would be desirable. But, generally speaking it is how I feel about most C++ code I come across. It may be extensible and reusable in various places, but it's not worth it. I'd rather create a GUI editor extension language that would allow me to create the template there, and have it pop in a few variables, and actually generate source code for me, even if it contained some markup to allow future edits to the template which, when changed, automatically went into the source code and refactored those things which were from that template. > such as @. I don't think C++ needs more symbols. (The template > definition is of course a one-off. You would just put it in a header > somewhere, and forget about the implementation details.) I could be wrong in all my ideas. We'll see what the future holds when CAlive is completed (James 4:15). > And it's fine that /your/ main concern here is CAlive - but you should > not be surprised to see that most people's main concern in this > newsgroup is C++. I am only surprised by the number of people who are willing to seek a possible alternative, and then run with it, rather than trying to make it simpler. Writing a C++ compiler is difficult and it takes a lot of work. But that large workload is nothing compared to the amount of work the millions of developers world-wide go through on their various projects each day. Because there is such a large base of developers who would benefit from changes to the language, there are some changes which I believe would make sense. If I were to apply this change to C++, I would simply add an extension to the existing language which allowed a switch to generate a warning in each location a value is being passed by reference without having a commensurate @ associated with it. That way developers can go in and markup their code at each warning location to include the @ so that it is visibly identifiable that the value going into that function is not being passed by value, but by reference, and therefore it could be updated. I think it's a simple request, a logical extension, and something that addresses a shortcoming in source code written in C++. But, that's just my take on it. I could be wrong. Best regards, Rick C. Hodgin |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: May 04 06:10PM +0200 On 03.05.2016 19:26, Rick C. Hodgin wrote: >> pass or use the reference. > I WANT to use special syntax to pass by reference. I want it to show up > in source code so I know it's a reference rather than a value pass. template< class Type > using Ref_ = Type&; template< class Type > class XRef_ // explicit reference { private: Type* p_; auto operator=( Ref_<const XRef_> ) -> Ref_<XRef_> = delete; public: auto object() -> Ref_<Type> { return *p_; } operator Ref_<Type> () const { return object(); } explicit XRef_( Ref_<Type> r ): p_( &r ) {} }; template< class Type > auto xref( Ref_<Type> r ) -> XRef_<Type> { return XRef_<Type>( r ); } void foo( XRef_<int> x ) { x.object() = 42; } auto main() -> int { int a; #ifdef TEST foo( a ); //! Nope.
Subscribe to:
Post Comments (Atom)
|
No comments:
Post a Comment