question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MAINT: Create static inline functions for builtin (numeric?) casts

See original GitHub issue

The 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:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
serge-sans-paillecommented, May 10, 2022

Challenge accepted 😃

0reactions
serge-sans-paillecommented, May 10, 2022
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found