Establish standard coding practices in terms of things to avoid (as opposed to desirable actions, which are covered in a separate item, identified below).
Make the following five practices standard procedure:
Switch between using 64-bit SIMD integer instructions and x87 floating-point instructions. All 64-bit SIMD integer instructions use the MMX™ technology registers, which share register state with the x87 floating-point stack. Because of this sharing, certain rules and considerations apply. Instructions that use the MMX technology registers cannot be freely intermixed with x87 floating-point registers.
How to link your project to MKL libraries, linking tips for MKL libraries, and Intel® Math Kernel Library compiler issues.
Install a UNIX shared library prior to use. The shared-library file, once created, should be copied to one of the standard library directories. Creating such a file, libcakeinfo.so.1.0, using the ld command, is covered in the separate item "How to Create a UNIX (including Linux) Shared Library."
Create a UNIX shared library based on a piece of existing code. For example, the following code calculates how many people can be fed by a particular size of birthday cake. The feeds_how_many method in the cake_info class is shown in Listing 1 and Listing 2 below:
Listing 1. libcakeinfo.hpp
Use and locate a UNIX shared library. The caketester application in the following code shows an example that tests the libcakeinfo library that is created in a separate item, "Create a UNIX (including Linux) Shared Library." The main method invokes the feeds_how_many method to determine how many people a 10 inch hexagonal sponge cake will feed:
After updating a UNIX shared library, increment the version number to reflect the change. A library can be modified, and depending on the nature of the change, applications can pick up the new version of the library or continue to use the older version. These behaviors are governed by the major and minor version numbers.