If I want a subroutine to be inlined in the calling routine, where may I keep it? Need it be in the same module or file? Can inlining be done with subroutines from different object files? May the answer be compiler dependent?
Where put subroutine/function to inline
755 Views Asked by Jonatan Öström At
1
There are 1 best solutions below
Related Questions in FORTRAN
- Looping over defined array elements in Fortran
- Is it safe to list optional fortran function argument in OpenMP shared clause?
- Equivalent to asm volatile in Gfortran?
- gfortran does not find symbol fabsq_ in libquadmath
- Assigning values of an array in a loop
- Data exchange - Python and Fortran
- ieee_arithmetic intrinsic module in gfortran
- How to initialize two distinct blacs contexts?
- Fortran Debugging
- need to get f2py working, but don't know any fortran
- Combine Fortran .for and .f90 include header files
- How to parallelize csh script with nested loop
- VS2013 integration with Intel Fortran Compiler
- Windows 8.1 Pro MinGW Gfortran Command Prompt 'not recognized command' error
- How does automatic typecasting (type conversion) work in Fortran?
Related Questions in FORTRAN90
- Assigning values of an array in a loop
- How does automatic typecasting (type conversion) work in Fortran?
- Fortran DO loop, warning to use integer only
- Array slicing in FORTRAN 77
- Fortran derived type in common: initialization?
- Fortran: makefile error
- Ambiguous reference to variable
- Unclassifiable statement at (1) in Fortran
- unformatted output with wild card in Fortran
- Sum and Construct an Array in one statement
- Subroutine Name Fortran Name
- Fortran calculate distance of many points to fixed point
- What is the purpose of result variables in Fortran?
- What does 0.0_p2 mean?
- How to initialize array of integer kind 8 in fortran?
Related Questions in GFORTRAN
- Equivalent to asm volatile in Gfortran?
- gfortran does not find symbol fabsq_ in libquadmath
- Assigning values of an array in a loop
- ieee_arithmetic intrinsic module in gfortran
- Windows 8.1 Pro MinGW Gfortran Command Prompt 'not recognized command' error
- How does automatic typecasting (type conversion) work in Fortran?
- gfortran doesn't compile real variables
- Undefined reference to `linrg_` in IMSL library with gfortran in CodeBlocks
- Fortran DO loop, warning to use integer only
- Checking all elements of array for a logical condition in fortran
- Why are these two calculations which are exactly same giving different results in Fortran using gfortran?
- Different behaviour of compiler when called in script by LaunchControl
- How do I install gtk-fortran on windows 8?
- selected_real_kind in gfortran and code::blocks
- 32-bit pointer overflow in 64-bit gcc code - fails in compile
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
This is not controlled by the Fortran standard. The processor can do as it sees fit.
It will definitely depend on the compiler settings.
Commonly, internal functions will be inlined. But many other other functions are often inlined as well, at least if they happen to be in the same source file or module.
But even inlining from other source files / compiled object files is not out of the question. That can and is often done during link time optimizations (https://gcc.gnu.org/wiki/LinkTimeOptimization). These optimizations are either included in certain compiler flags (like
-fast) or can be enabled separately (-flto,-ipo).