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
757 Views Asked by Jonatan Öström At
1
There are 1 best solutions below
Related Questions in FORTRAN
- Writing code for River Section Coordinates in Fortran
- How to get size of array directly from Fortran to R?
- OpenMP multi-threading not working if OpenMPI set to use one or two MPI processor
- Problems with converting old Fortran code
- Why is my code crashing with "Illegal address during kernel execution" when I use subroutines to copy or deallocate members of derived type variables?
- Getting distances of points in 2D space in an array in Fortran using the concept of broadcasting (Python)
- Conflict between lexer rules in ANTLR4 for Fortran grammar
- how to automatically generate a Module from a project in Visual Studio
- I am encountering an f2py dimension error when passing numpy array to fortran
- Why is there an error with gfortran but ifort and pgf90 do not?
- Parallelize nested loop with running sum in Fortran
- Calling c++ from fortran
- Visual Studio Code Not Recognizing findent Installation for Modern Fortran Extension Despite Correct Python Interpreter and PATH Configuration
- Different floating point representations of identical 64 bit double precision numbers
- How to define a Function in Fortran
Related Questions in FORTRAN90
- Error: Unexpected data declaration statement AND symbol has no IMPLICIT type
- Fortran 95, How to read blank (letter space) character from the end of the line?
- How can I get MPI module to work with Fortran using Code:Blocks on Windows 10?
- Why is this simple Fortran matrix inversion code not returning the expected value with LAPACK?
- Does Fortran store values in an array differently than a non-array declared variable?
- Error: 'mask' argument of 'count' intrinsic at (1) must be a logical array
- find and modify highest n values in a 2D array in fortran
- Including/omitting write statement changes code output in Fortran
- How do I nest an array of strings inside another array in Fortran
- Difference in Matrix operations with very small values on Eigen (C++) vs Fortran 90
- Fortran rounding decimals to .0 from netcdf file
- How to find minimum of each column in Fortran and sum op all elements of that column?
- Bisection method in fortran with compilating error
- Fortran 90 to Fortran 2003 : pointer undefined reference
- 'Random' "Program received signal SIGABRT: Process abort signal." Error
Related Questions in GFORTRAN
- Writing code for River Section Coordinates in Fortran
- How to work around the "collect2: error: ld returned 1 exit status" error when running simple fortran files with the gfortran command?
- Why Gfortran fails to compile large file without any warning or errors
- gfortran not found; clang:error: linker command fialed wite exit code 1
- How do I uninstall gfortran and have the new installed version into the same file as my Xcode for Mac computer?
- How to define a Function in Fortran
- How can I install LAPACK for gfortran compiler in Visual studio code?
- How to avoid undefined reference when linking objects in cyclic dependencies in Gfortran
- A try to simulate a class in Fortran like in OOP-languages using gfortran
- Unable to `#define` in Fortran's program body
- How to set double precision for elements of an array in Fortran 90
- Compiling fortran program with archive library results in undefined reference state
- GNU Fortran - Function 'dcosd' has no IMPLICIT type
- is coverage reporting (gcov) with f2py possible? for a shared dll / python module
- Creating temporary array when declared in a module
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 # Hahtags
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).