--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/0e5ce74c-3e9e-4cf2-4afd-f7333ed82c5d%40gmail.com.
On Friday, 18 May 2018 14:13:15 PDT Andrey Semashev wrote:
> What is "the right thing"? Does it have to be a byte-granular operation?
> Does it have to be a forward iteration? Is this behavior the same on all
> implementations? You have to answer on all these questions in the
> standard wording so that everyone can rely on the exact memory access
> pattern, which is important in case of volatile memory.
>
> If it is not important in your case then you don't need volatile and
> hence the overload.
On the other hand, if your memory storage requires a specific behaviour which
cannot be standardised, maybe you should implement the copying directly in
your code. It's not like bytewise memcpy and memset are particularly difficult
to implement...
It's the SIMD-optimised with cacheline-alignment and such that are.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposal...@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2300193.1RphyUdPvq%40tjmaciei-mobl1.
Jens
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/5B0520CD.30204%40gmx.net.
On Wednesday, 23 May 2018 10:31:15 -03 dgutson . wrote:
> I think that we could think about some requirements packed in something
> like a memory_traits, where it would specify:
> - pointer type (optionally volatile-qualified)
> - alignment requirements
> - memory synchronization needs / specifications (an enumerator)
> - vectorization habilities
Or, like I said, you can roll out your own memcpy or memset (which are quite
trivial) if you have specific requirements.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1695197.Kxq4M8jdJr%40tjmaciei-mobl1.
On Wed, May 23, 2018 at 12:13 PM, Thiago Macieira <thi...@macieira.org> wrote:On Wednesday, 23 May 2018 10:31:15 -03 dgutson . wrote:
> I think that we could think about some requirements packed in something
> like a memory_traits, where it would specify:
> - pointer type (optionally volatile-qualified)
> - alignment requirements
> - memory synchronization needs / specifications (an enumerator)
> - vectorization habilities
Or, like I said, you can roll out your own memcpy or memset (which are quite
trivial) if you have specific requirements.I propose to leave "triviality" out of the discussion, since this can get combinatoric complex, and there is no metric of "triviality" either.There are many std functions that are arguably trivial as well, and despite that, they are in the STL because people use them.We can keep arguing about triviality, what is trivial and what isn't, and we will end up comparing somebody with Hitler as per Godwin's Law.Please forgive me, I sincerely respect you but this is not a discussion I would like to have.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1695197.Kxq4M8jdJr%40tjmaciei-mobl1.
--Who’s got the sweetest disposition?
One guess, that’s who?
Who’d never, ever start an argument?
Who never shows a bit of temperament?
Who's never wrong but always right?
Who'd never dream of starting a fight?
Who get stuck with all the bad luck?
This might be interesting.In some systems, the implementation of memcpy() & friends cannot be used for memory-mapped devices.Usually, mapped memory is marked as volatile.I'm proposing to add volatile pointers overloads for the memcpy() function and friends, without specifying exactly what should be different at the standard-level, but allowing implementations to provide a particular behavior. I'm just proposing to add the declaration to the standard.
On Friday, May 18, 2018 at 9:41:08 PM UTC+1, dgutson wrote:This might be interesting.In some systems, the implementation of memcpy() & friends cannot be used for memory-mapped devices.Usually, mapped memory is marked as volatile.I'm proposing to add volatile pointers overloads for the memcpy() function and friends, without specifying exactly what should be different at the standard-level, but allowing implementations to provide a particular behavior. I'm just proposing to add the declaration to the standard.Just there this weekend I, yet again, had to write a custom memcpy() implementation because the built-in one can be elided by the compiler during optimisation. I'd like to stop having to write memcpy() personally.I think your idea has two variants:
- Cannot be optimised out memcpy/memset/memmove etc. I'd suggest secure_memset(), secure_memcpy(), secure_memmove() and so on rather than editions taking a volatile pointer.
- Said routines, but with additional std::memory_order parameter
--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposal...@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFQaeCD83_FBX4cAE%2B9AAEHai4ciCeOaorHY1K94k_Yb0e9wnA%40mail.gmail.com.