An interesting article.
http://www.eet.com/news/latest/showArticle.jhtml?articleID=184428758
An interesting article.
http://www.eet.com/news/latest/showArticle.jhtml?articleID=184428758
What i could actually understand of that was helpful for a beginner c/c++ programmer like me. Thanks.
Thanks for sharing that tutorial :)
Thnks!! xD
can u give me some good online free tutorials for learning programming microcontroller in c
thanks
It looks like the article is no longer available on eetimes. I searched using the article ID. I also tried searching by the title. I got no joy in either case.
After googling the title, I found an article of the same title written in 2006. Perhaps it's the same one indicated in the OP? I thought I'd propose this as the new link for the article...
It is in fact the same article.
The 'restrict' keyword is a new one for me.
Really, you never heard of "restrict"? It's fairly key for writing optimal code when, for example, you are processing image areas where it's kind of key to reassure the compiler that the pointer to the source and destination don't overlap (for example)
Really, you never heard of "restrict"?
Really. Everyone has a blind-spot ;-)
It's fairly key for writing optimal code when, for example, you are processing image areas where it's kind of key to reassure the compiler that the pointer to the source and destination don't overlap (for example)
Image processing is far beyond my paygrade :-)
Seems "restrict" was added in C99. Not anywhere to be found in K&R 2nd edition, nor in my oft-linked-to online reference The C Book.
I do find it in n1256 (and n1124).
Also:
https://en.wikipedia.org/wiki/Restrict
... and the links external therein:
http://www.cellperformance.com/mike_acton/2006/05/demystifying_the_restrict_keyw.html
http://www.oracle.com/technetwork/server-storage/solaris10/cc-restrict-139391.html
http://www.lysator.liu.se/c/restrict.html
I especially like:
THE RESTRICT CONTRACT
I, [insert your name], a PROFESSIONAL or AMATEUR [circle one] programmer recognize that there are limits to what a compiler can do. I certify that, to the best of my knowledge, there are no magic elves or monkeys in the compiler which through the forces of fairy dust can always make code faster. I understand that there are some problems for which there is not enough information to solve. I hereby declare that given the opportunity to provide the compiler with sufficient information, perhaps through some key word, I will gladly use said keyword and not bitch and moan about how "the compiler should be doing this for me."
In this case, I promise that the pointer declared along with the restrict qualifier is not aliased. I certify that writes through this pointer will not effect the values read through any other pointer available in the same context which is also declared as restricted.
* Your agreement to this contract is implied by use of the restrict keyword ;)