Samples

The samples included with Intel(R) Visual Fortran are designed to illustrate specific compiler optimizations, features, tools, and programming concepts.

Many of the samples are small, single source files intended to illustrate the associated concept in a general way. The sample sources contain the command line options and, where applicable, environment settings needed for compilation on Linux*, Mac OS*, and Windows*.

See Included Samples in Optimizing Applications for details on finding complete build instructions for these samples.

Some of these samples are meant to illustrate features during compilation only and do not result in executables.

Compiler Area

Location

Description

Automatic
optimizations
..\samples\optimize\ Illustrates how to use the automatic compiler options to quickly change the performance of an application.
Profile-guide
Optimization (PGO)
..\samples\pgo_samples\ Illustrates profiling an application, generating PGO compiler reports, and using the code-coverage and test-prioritization tools
Interprocedural Optimization (IPO) ..\samples\ipo_samples\ Illustrates using multi-file IPO compilation and generating IPO compiler reports.
OpenMP* support ..\samples\openmp_samples\ Illustrates using OpenMP* pragmas to create multi-threaded applications.
Vectorization ..\samples\vec_samples\ Illustrates loops that will and will not vectorize on specific architectures. These samples also illustrate using the vectorization reporting features.

Intel(R) Visual Fortran Programming Samples

These samples are provided as Microsoft Visual Studio .NET 2003* solutions (and can be used with Microsoft Visual Studio 2005*), along with a build file that builds the Fortran (and C where provided) files from the command line. Some of these samples have a readme.txt file included.

Samples Area

Location

Sub-Directories and Sample Descriptions

Dialogs ..\sample\dialog\
  • CELSICON:  Console application that uses some controls from the WHIZZY sample demonstrating more advanced uses of dialog box controls and modifying attributes such as fonts.
  • FXPLORER: Demonstrates use of an ActiveX control (Microsoft* Internet Explorer) in a Fortran dialog box.
  • TEMP: Simple dialog sample showing slider control.
  • WHIZZY: Demonstrates many of of the dialog controls.
DLLs ..\sample\dll\
  • DLL_Shared_Data: Demonstrates how to build a DLL that can be used by multiple applications to share data.
Exception Handling ..\sample\exceptionhandling\
  • GETEPTRS: Demonstrates use of GETEXCEPTIONPTRSQQ.
Miscellaneous ..\sample\miscellaneous\
  • CopyFolder: Recursively copies folders of files.
  • WinPrint: Print text from a Fortran file to a Windows printer.
  • WinPrint_Direct: Write PostScript* or other printer languages directly to a printer.
Mixed Language Support ..\sample\mixedlanguage\
  • C_Calls_Fortran: C main program calling a Fortran subroutine either from a library or a DLL.
  • Excel: Excel calling a Fortran DLL.
  • Fortran_Calls_C: Fortran main program calling a C subroutine.
  • VB.NET-Safearrays: Visual Basic.NET program calling a Fortran DLL passing it arrays of strings of arbitrary dimensions. Demonstrates use of SafeArrays and BSTRings.
  • VB-Calls-Fortran: Simple example of calling a Fortran DLL from Visual Basic.
OpenGL* ..\sample\opengl\
  • 3DCube: draws a simple multicolored 3D cube.
  • Olympic: Animated colored rings that rotate and move into place. Press the spacebar to repeat.
  • Puzzle: A "Rubik's Cube" type puzzle.
  • Simple: Draws some simple objects.
QuickWin Applications ..\sample\quickwin\
  • Calendar: Draw's this month's calendar with menus, graphics and color.
  • QWPaint: Like finger painting, but with Fortran! Don't get the screen dirty.
  • Scigraph: 2D plotting library using QuickWin.
Win32 Applications ..\sample\win32\
  • Angle: Draws graphics using Win32.
  • Crypto: Demonstrates using the Win32 Crypto API to encrypt and decrypt files.
  • Generic: Simple framework for a Win32 application.
  • GetOpenFileName: Demonstrates use of GetOpenFileName to create a file browsing dialog.
  • Platform: Displays information about the processor and Windows version.
  • ProcessStatus: Demonstrates some of the Process Status API (PSAPI) functions.