-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[humble request] add support for input from flash memory (memcpy_P) #745
Comments
Good point. (1) Eliminate raw
|
If I understand correctly, I'm indeed surprised to learn that Anyway, assuming this is not classified as a Indeed, the first step, as mentioned by @t-mat, should be to ensure that there is no direct call to |
potential issue: How can we mix
|
oh, so In which case, I could imagine a C11 macro solution based on One important thing xxhash can provide is to ensure that all |
AFAIK, AVR has dedicated instruction for each memory type.
And actual implementation of http://svn.savannah.nongnu.org/viewvc/avr-libc/trunk/avr-libc/libc/pmstring/memcpy_P.S?view=markup
( Sorry, I mean Yes, application programmer must carefully recognize their situation and choose
I'm not sure about ability of recent compilers.
Right. If we'll support these NUMA platform, I think we should define and use the following functions
And I'm not sure we still have speed gain with these restrictions or not. |
hi... thanks for your interest
i suggest another name like XXH_PROGMEM more appropiate for this case, since the latter sounds specific to that function and not generic for all possibly progmem functions needed also, i think support for progmem functions should be added, not switched or replaced... see for example the first example i posted in which we can see calls to overloaded be aware in this case @Cyan4973 i believe even until i know is not optimal (especially for such a limited platform like arduino and similar), in the meanwhile i am trying the workaround below ... so i think the point all this conversation is to actually to keep the work with this lib blaze optimized and avoid heavy workarounds like this snippet:
|
Closing. It seems a version differentiating |
hi... i know this issue is closed .. don't be so drastic yet, because the solution may be more simple than you think since it had been some time from this issue, maybe i forgot some details (additionally, i am not a C/C++ programmer but a regular user, so to have been able to talk in same tech level with you fills me with pride :) ) ... but basically, taking the example from my opening post and the commonn existence of
this should make available the new whaf if you reopen the issue and request it to some skilled collaborator? (i could make a blind PR if you want) thanks |
I think the issue here is that we must first make a complete pass over the code to understand where the I suspect this is a bit more complex to ensure than it sounds, but it would still be tractable if limited to |
hi... as all we know, hhXash is a very small and efficient hash algoritm, what makes it perfect for embedded systems
most embedded systems with harvard architecture (like development boards, home routers, soc's, thin clients, media centers, etc.) have eeprom/flash memory storages and have the capability to read data directly from program flash memory to save ram
recently i had a problem trying to make streaming mode work in arduino uno (stripped down example)
the program crashes at 4th line because it doesn't know what to do with
(PGM_P) F("ino")
what is a pointer to a char array (c_str) stored in higher program flash memoryfor these situations where data resides in program memory, avr, xtensa, gnu c++ compilers and many other architectures and sdk's have the
*_P
version for some functions, likestrlen_P()
,strcpy_P()
,memcpy_P()
, etc. (i.e. for arduino, for esp8266)i tried adding this function to
xxhash.h
in line ~1740 and add support forXXH32_update()
as a test for my particular case and worked flawlessly...if you think it could help small systems users and worth to be added later, more
*_P
functions could be "oficially" added and enabled/disabled through a build modifierplease tell us what do you think, and if you think it could be a good idea
The text was updated successfully, but these errors were encountered: