In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
When it comes to inline, you may still stop at the C++ scriptures more than ten years ago or even more than twenty years ago. C++ has inline keywords and is even used to distinguish it from c. c99 began to introduce inline c, gcc earlier than c99 to achieve inline support, vc c no keyword inline, inline can only be used for c++, but there is another keyword__inline, but if you want to use vc to compile gcc c code, encountered cl complaints do not recognize inline, as long as inline in the pre-compiled macro defined as__inline can also be.
There is also a noinline in the gcc compiler attribute. Why would there be a noinline when there is an inline? If you don't use inline, isn't it equal to noinline? There is also the always_inline attribute. Because in practice, all definitions of inline are not necessarily inline, and the final decision is made by the gcc compiler, but your declaration will affect its decision. Similarly, if you don't define inline, functions don't necessarily have to be inline. Compilers usually decide to inline some functions for you in optimization, regardless of the size of the function. The noinline and always_inline attributes are literally that.
Just recently debugged ffmpeg code, encountered an example, used as an example:
FFMPEG is a C code project.
avformat_write_header is a ten-line function that calls other functions.
init_muxer is a large static function, not defined inline, but inline into a small function (avformat_write_header).
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.