- My C++ synchronization objects library was updated.. - 3 Updates
- cmsg cancel <ngr70p$36m$5@dont-email.me> - 4 Updates
- What was the reasoning behind &'s syntax? - 10 Updates
- I have just read this from Martin Thompson - 2 Updates
- C++ Middleware Writer - 4 Updates
- Lamda expression as "with"-block - 2 Updates
Ramine <ramine@1.1>: May 10 03:18PM -0700 Hello....... My C++ synchronization objects library was updated.. I have just updated my C++ synchronization objects library, i have made some variables "volatile" in my scalable Asymmetric Distributed Read-Writer Mutex algorithms, to be sure of visibility accross cores, so now you can be more confident. So you can download my new and extended C++ synchronization objects library from: https://sites.google.com/site/aminer68/c-synchronization-objects-library Thank you, Amine Moulay Ramdane. |
Ramine <ramine@1.1>: May 10 03:38PM -0700 Hello.... Please take a look at the source code of the Delphi XE DRWLock here: https://sites.google.com/site/aminer68/scalable-distributed-reader-writer-mutex I have delclared the following variables in LW_RWLockx.pas "volatile" like this: [Volatile] FCount1: PMyRecord1; [Volatile] FCount2: PMyRecord2; [Volatile] FCount3: PMyRecord3; [Volatile] nbr: PMyRecord4; And i have delclared the following variable in RWLockx.pas "volatile" like this: [Volatile] FCount1: PMyRecord1; [Volatile] FCount2: PMyRecord2; [Volatile] FCount3: PMyRecord3; [Volatile] nbr: PMyRecord4; [Volatile] nbr1: PMyRecord5; So now you can be more confident of visibility accross cores. Thank you, Amine Moulay Ramdane. |
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: May 10 08:42PM +0100 On Tue, 10 May 2016 15:18:04 -0700 > i have made some variables "volatile" in my scalable Asymmetric > Distributed Read-Writer Mutex algorithms, to be sure of visibility > accross cores, so now you can be more confident. What about "Other than that i will quit this group and let you now do your job of discussing matters of C++." That didn't last wrong. Your basic problem is that you are clueless. Your posts are unmitigated rubbish and I cannot imagine anyone wanting to use your code seriously (even you know your code is rubbish because it seems that nearly every day you post a succession of new message about how you have had to change it again because of some new perceived issue). You have completely misunderstood 'volatile' in C and C++, and the meaning of the article to which you earlier referred about it. Clearly, it is a minimum condition for a variable to be visible to all cores that it should not be a register variable. From that, you assume that avoiding registers (say, by using 'volatile' on Intel) will _make_ the variable visible to all cores. _Making_ a variable visible to all cores requires synchronisation, which 'volatile' doesn't do (the article to which you referred does subsequently discuss Java 'volatile' for the purpose, which is another kettle of fish and does synchronise). In any event, you seem completely unaware of the C11 and C++11 memory models. You are such a twit that you may also be confusing sequential consistency with cache coherency (Intel is naturally cache coherent), but it is difficult to tell. Until you have actually acquired some relevant knowledge and can post without showing you are an idiot, why not just shut up? |
bleachbot <bleachbot@httrack.com>: May 10 01:41AM +0200 |
bleachbot <bleachbot@httrack.com>: May 10 02:23AM +0200 |
bleachbot <bleachbot@httrack.com>: May 10 09:15PM +0200 |
bleachbot <bleachbot@httrack.com>: May 10 09:36PM +0200 |
"Öö Tiib" <ootiib@hot.ee>: May 10 01:56AM -0700 On Sunday, 8 May 2016 18:25:36 UTC+3, Jerry Stuckle wrote: > > That is exactly what you did. Therefore what you have there is not > > reference to NULL but a reference to demons from your nose. > Yes, and it is "undefined behavior" - not "illegal". A huge difference. Of course there is huge difference, but for me the difference is like between "a cat" and "an animal". IOW for me it has always been that invoking "undefined behavior" is in a subset of things that are "illegal". With ill-formed code the compiler is required to deliver a diagnostic about it being illegal. With undefined behavior the compiler may do whatever. That "whatever" includes compile-time or run-time diagnostic about the code being illegal (on lot of cases compilers do that) but also it includes silently producing a program that leaves appearance of working and that a reference in it is a null reference. So perhaps the disagreement here is about what is meant with "illegal". |
Paavo Helde <myfirstname@osa.pri.ee>: May 10 02:22PM +0300 On 10.05.2016 11:56, 嘱 Tiib wrote: > On Sunday, 8 May 2016 18:25:36 UTC+3, Jerry Stuckle wrote: >> Yes, and it is "undefined behavior" - not "illegal". A huge difference. > So perhaps the disagreement here is about what is meant with "illegal". I bet Jerry means that writing C++ programs containing UB is not prohibited by a law. Curiously, the only thing what the C++ standard considers illegal is using 'static' or 'extern' specifier with a type declaration (7.1.1 [diff.dcl]). Cheers Paavo |
Jerry Stuckle <jstucklex@attglobal.net>: May 10 09:49AM -0400 On 5/10/2016 4:56 AM, Öö Tiib wrote: > includes silently producing a program that leaves appearance of working > and that a reference in it is a null reference. > So perhaps the disagreement here is about what is meant with "illegal". It doesn't matter what it means to you. What matters is what the standard says. And it specifically states this is "undefined behavior". -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ================== |
Jerry Stuckle <jstucklex@attglobal.net>: May 10 09:50AM -0400 On 5/10/2016 7:22 AM, Paavo Helde wrote: > [diff.dcl]). > Cheers > Paavo You have no idea what I mean. I use what the standard specifies. And in this case it is very clear that it is undefined behavior. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ================== |
"Öö Tiib" <ootiib@hot.ee>: May 10 07:48AM -0700 On Tuesday, 10 May 2016 16:49:09 UTC+3, Jerry Stuckle wrote: > > So perhaps the disagreement here is about what is meant with "illegal". > It doesn't matter what it means to you. What matters is what the > standard says. And it specifically states this is "undefined behavior". C++ standard does not define "legal" or "illegal". So when people use that word then it means something that standard does not say. Therefore you can not tell if "undefined behavior" is subset of "illegal" or not merely by using that standard. |
David Brown <david.brown@hesbynett.no>: May 10 04:56PM +0200 On 10/05/16 15:49, Jerry Stuckle wrote: >> So perhaps the disagreement here is about what is meant with "illegal". > It doesn't matter what it means to you. What matters is what the > standard says. And it specifically states this is "undefined behavior". Enlighten us. How does the standard (any version, C or C++) define "illegal" and "legal", and therefore make clear the difference between "illegal" and "undefined behaviour" ? Rather than making a big song and dance about "legal" and "illegal" as though they were important terms, why not just use the terms the standards actually use? On the few occasions where "legal" and "illegal" are used (4 times, in C++14 standards), it is clear that they mean "well-formed" and "ill-formed". So it is possible to write a well-formed program that conforming compilers may accept, and which construct a reference to null, by converting a pointer into a reference or some similar construct. But doing so is undefined behaviour, and a compiler which sees that this is happening, may validly reject the code. |
red floyd <no.spam@its.invalid>: May 10 10:36AM -0700 On 5/10/2016 6:49 AM, Jerry Stuckle wrote: >> So perhaps the disagreement here is about what is meant with "illegal". > It doesn't matter what it means to you. What matters is what the > standard says. And it specifically states this is "undefined behavior". http://xkcd.com/386 |
Jerry Stuckle <jstucklex@attglobal.net>: May 10 01:38PM -0400 On 5/10/2016 10:48 AM, Öö Tiib wrote: > word then it means something that standard does not say. Therefore you > can not tell if "undefined behavior" is subset of "illegal" or not > merely by using that standard. If it doesn't define "legal" or "illegal", then something cannot be "illegal" then, can it? -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ================== |
Jerry Stuckle <jstucklex@attglobal.net>: May 10 01:39PM -0400 On 5/10/2016 10:56 AM, David Brown wrote: > converting a pointer into a reference or some similar construct. But > doing so is undefined behaviour, and a compiler which sees that this is > happening, may validly reject the code. If there is no definition of "legal" or "illegal", then something cannot be classified as either. And I am using the words the standard uses - "undefined behavior". I'm not the one who called it "illegal". I said it was not. Learn to read. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ================== |
scott@slp53.sl.home (Scott Lurndal): May 10 06:41PM >Learn to read. Learn to trim your posts. |
Ramine <ramine@1.1>: May 09 07:45PM -0700 Hello..... I have just read this from Martin Thompson: "Firstly, our compilers can generate programs that store variables in registers for relatively long periods of time for performance reasons, e.g. variables used repeatedly within a loop. If we need these variables to be visible across cores then the updates must not be register allocated. This is achieved in C by qualifying a variable as "volatile". Beware that C/C++ volatile is inadequate for telling the compiler to order other instructions. For this you need fences/barriers." read more here: https://dzone.com/articles/cpu-cache-flushing-fallacy So i think that a necessary and sufficient condition so that the variable be visible accross cores is to qualify a variable as "volatile". So i don't think that Dmitry Vyukov is right to add the windows function called FlushProcessWriteBuffers() when he wrote this: https://groups.google.com/forum/#!topic/lock-free/Hv3GUlccYTc I don't think this algorithm of Dmitry Vyukov needs FlushProcessWriteBuffers(), because it already has declared the necessary variable as "volatile". Thank you, Amine Moulay Ramdane. |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: May 10 06:26PM +0100 On 10/05/2016 03:45, Ramine wrote: > So i think that a necessary and sufficient condition so that > the variable be visible accross cores is to qualify > a variable as "volatile". You would be wrong to do that as that is not what the volatile keyword is for. /Flibble |
woodbrian77@gmail.com: May 09 08:42PM -0700 On Monday, May 9, 2016 at 1:16:51 AM UTC-5, Juha Nieminen wrote: > Isn't it curious how your god is so impotent that he needed the aid of > a human being to save the animals. He couldn't just snap his fingers > and make it happen. This may be related to the question of why G-d created man. I agree with those who think the answer is in order to love people. "The L-rd G-d placed the man in the Garden of Eden as its gardener, to tend and care for it." Genesis 2:15 That is similar it seems to me to Noah's assignment. G-d wanted to save Noah and the animals so having Noah build something for both people and animals accomplishes that. I think G-d could have done it in other ways, but the way He did it allows Him to reveal Himself to Noah in ways that strengthen their relationship. > He could break the laws of physics and build a ship > that's a physical impossibility, How big do you think the ark was? This site http://www.creationtips.com/arksize.html mentions it may have been 450 feet long, 75 feet wide, and 45 feet high. Brian Ebenezer Enterprises http://webEbenezer.net |
Juha Nieminen <nospam@thanks.invalid>: May 10 06:17AM > http://www.creationtips.com/arksize.html > mentions it may have been 450 feet long, 75 feet wide, > and 45 feet high. Out of wood. With stone age technology. We can't build a seaworthy ship out of wood even with modern technology and modern materials because it's just not physically feasible. And that's just one of the dozens of impossibilities and fallacies in the entire story. The story reads like a myth, is completely consistent with a myth, contains physical impossibilities, and makes absolutely no logical sense, and the entire event was completely unnecessary. Why is it so hard to accept that it's just a myth. If you want to think the story is metaphorical, then so be it, but it's not literal because it can't be literal. It reads exactly like any other myth of any other culture or religion. You give this particular myth special treatment because of your own religion and your own biases, and you are incapable of seeing it in a more level-headed context. --- news://freenews.netfront.net/ - complaints: news@netfront.net --- |
Daniel <danielaparker@gmail.com>: May 10 08:57AM -0700 On Tuesday, May 10, 2016 at 2:17:36 AM UTC-4, Juha Nieminen wrote: .> > The story reads like a myth, . The flood stories are very hold, and predate the Judaic traditions. In the ancient Babylon traditions, the reason for the flood was because one of the divine assembly, Enlil, was disturbed by the growing number of human workers, he couldn't stand their uproar, he couldn't sleep, he first tried to control them with a plague, then drought, then famine, but in each case was thwarted by the divine patron of the workers, Ea-Enki. Eventually the divine assembly decided to control the workers with a flood. Ea-Enki tipped off a human worker, Atrahasis, who then built a barge and filled it with animals. I believe Brian likes the Judaic version of the story, set when Judaism had moved from polytheism to monotheism. But with monotheism, the focus changed from conflict between the different divine figures, to the inner turmoil of Yahweh, and his somewhat obsessive fixation on humans, now that he had no other gods to interact with. I prefer the older ones. Daniel |
scott@slp53.sl.home (Scott Lurndal): May 10 05:20PM >by the divine patron of the workers, Ea-Enki. Eventually the divine assembly >decided to control the workers with a flood. Ea-Enki tipped off a human >worker, Atrahasis, who then built a barge and filled it with animals. Whereas in reality, the flood myths are likely based in the relatively rapid rise of sea level following the last glaciation period. Both the med basin and the red sea (iirc) had sudden influxes of water during that timeframe. But I'm sure Brian doesn't believe that glaciers existed, since his world started six thousand years ago. |
"Öö Tiib" <ootiib@hot.ee>: May 10 02:09AM -0700 On Monday, 9 May 2016 17:22:52 UTC+3, Alf P. Steinbach wrote: > It's not the first time that that word substitution has happened to me. :( > It's probably like a melody that gets stuck in one's brain, difficult to > get rid of. IMHO Juha Nieminen was complaining that the 'Impl' is confusing and likely hiding vital things he expects to see. I do not think that he does not know what member initializer list is. |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: May 10 03:02PM +0200 On 10.05.2016 11:09, Öö Tiib wrote: > IMHO Juha Nieminen was complaining that the 'Impl' is confusing and likely > hiding vital things he expects to see. I do not think that he does not > know what member initializer list is. Oh, then I should direct him elsewhere, even though a good intro book should IMHO discuss the PIMPL idiom. Herb Sutter (chair of the standardization committee, chief architect of Visual C++) discusses it in a number of Guru Of The Week postings, see <url: https://www.google.no/search?q=gotw+pimpl> Incidentally, one of those postings is infamous (among the cognoscenti) for abusing `std::auto_ptr` as a pointer to implementation. :) PIMPL is discussed more in general in numerous articles all over the web, including in Wikipedia, which chooses to call it Opaque Pointer; see <url: https://www.google.no/search?q=pimpl+idiom>. In short it's a well known and quite common idiom. Including the naming. Cheers & hth., - Alf |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment