In this chapter we introduce the main themes that we will cover in this book and provide an introduction for each of them. We begin with a brief overview of C++ and define the two basic concepts of functions and classes as well as other syntactic elements of the language. We then introduce basic mathematical concepts that include elements of linear algebra, vector orthogonalization, and corresponding codes and software. Finally, we introduce parallel programming and review some generic parallel architectures as well as standard parallel algorithms for basic operations, e.g., the fan-in algorithm for recursive doubling. We also provide a brief overview of the main MPI commands.
The declarations and definitions of these functions/classes can be found in the following files:
- Section 2.1.1: SCVector class declaration
- Section 2.2.2: float FloatMachineEps() function definition
- Section 2.2.2: double DoubleMachineEps() function definition
- Section 2.2.9: SCstatus GramSchmidt(SCVector * x, SCVector * q) function definition
- Section 2.2.9: SCstatus GramSchmidt(SCVector * x, SCVector * q, SCMatrix &r) function definition
- Section 2.2.9: SCstatus QRDecomposition(SCMatrix X, SCMatrix &Q, SCMatrix &R) function definition
- Section 2.2.9: ModifiedGramSchmidt(SCVector * x, SCVector * q, SCMatrix &r) function definition
Go to the file SCchapter2.h for function/class declarations
Go to the file SCchapter2.cpp for function/class definitionsIn the case that an entire program (meaning that a main() function is provided) is presented in the text, we classify this as a driver program. Unlike the functions/classes above, driver programs are complete C++ programs which can be compiled and executed. As you read through the book, you will see that driver programs are often times created by using functions/classes which are in the SCchapter files. We denote driver programs which are explicitly given in the text of the book in red. In some chapters, we present very few driver programs explicitly in the text, however we provide some example driver programs which demonstrate how to use the functions/classes with in SCchapter files. Such driver programs are denoted in black.
Section 2.1: The simplest C++ code | chapter2c0.cpp |
Section 2.1.1: First non-trivial C++ program ("Hello World'') | chapter2c1.cpp |
Section 2.1.1: Using functions in C++ | chapter2c2.cpp |
Section 2.1.2: Examination of the boolean expression `<' | chapter2c3.cpp |
Section 2.1.2: Examination of the boolean expression `&&' | chapter2c4.cpp |
Section 2.1.2: Algorithm Collatz-A | chapter2c5.cpp |
Section 2.1.2: Algorithm Collatz-B | chapter2c6.cpp |
Section 2.2.2: Program to determine machine precision | chapter2c7.cpp |
Section 2.3.4: MPI - "HELLO!!'' program | chapter2c8P.cpp |
Section 2.3.4: MPI - Modified ``Hello world'' type program | chapter2c9P.cpp |
Section 2.3.4: Serial Summation | chapter2c10.cpp |
Section 2.3.4: MPI - Parallel Summation | chapter2c11P.cpp |