To exploit parallelism, it is convenient for an array's storage to be broken up into patches, which can be processed independently by different CPUs. Finally, one can imagine an array with no data at all. For example, the values can be computed from an expression involving other arrays, or analytically from the indices. The template parameters Dim , T , and EngineTag determine the precise type of the Array . Dim represents the dimension of the array's domain.
T gives the type of array elements, thereby defining the output range of the array.
EngineTag specifies the the manner of indexing and types of the indices. The Engine Concept To implement polymorphic indexing, the Array class defers data storage and data lookup to an engine object. The requirements that the Array template places on its engine provide the definition for the Engine concept. We'll describe these by examining a simplified version of the Array template, shown in Fig. 2 . This line will not compile if that definition is not supplied.