MAINT: Create static inline functions for builtin (numeric?) casts
See original GitHub issueThe scalar math (now) does some casting, and also the normal cast functions in lowlevel_strided_loops.c.src
are heavily templated and complicated.
It would seems useful to create static inline functions for these (probably via C++ templating now). That way we can simplify all casting code paths in one go.
See also https://github.com/numpy/numpy/pull/21188#discussion_r866521119 and the discussion on that PR.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Looking for clarification on static and inline functions
inline is easy to explain. inline basically is a hint to the compiler that the given function should be copied (inlined) into any...
Read more >Google C++ Style Guide
Inlining a function can generate more efficient object code, as long as the inlined function is small. Feel free to inline accessors and...
Read more >Language Compatibility - Apple Open Source
Change add to a static inline function. This is usually the right solution if only one translation unit needs to use the function....
Read more >gcc/doc/extend.texi - chromiumos/third_party/gcc - Git at Google
This built-in function returns the number of anonymous arguments of. an inline function. ... To make an integer constant of type @code{unsigned long....
Read more >Diagnostic flags in Clang — Clang 16.0.0git documentation
warning: '…' in this location creates a C-style varargs function ... warning: declaration of built-in function 'B' requires inclusion of the header <A> ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Challenge accepted 😃
@seberg let’s discuss that in https://github.com/numpy/numpy/pull/21486