Changes

Jump to: navigation, search

Fall 2019 SPO600 Weekly Schedule

2 bytes removed, 21:34, 2 October 2019
Week 5 - Class I
*#* The compiler will be very cautious about vectorizing code. See the Resources section below for insight into these challenges.
*#** In order to vectorize a loop, among other things, the number of loop iterations needs to be known before the loop starts, memory layout must meet SIMD alignment requirements, loops must not overlap in a way that is affected by vectorization.
*#** The compiler will also calculate a cost for the vectorization: in the case of a small loop, because the extra setup before the loop and processing after the loop may negate the benefits of vectorization.
*#* Vectorization in applied by default only at the -O3 level in most compilers. In GCC:
*#** The main individual feature flag to turn on vectorization is <code>-ftree-vectorize</code> (enabled by default at -O3, disabled at other levels).
*#** You can see all of the vectorization decisions using <code>-fopt-info-vec-all</code> or you can see just the missed vectorizations using <code>-fopt-info-vec-missed</code> (which is usually what you want to focus on, because it show only the loops where vectorization was ''not'' enabled, and the reason that it was not). This approach is generally very portable.
*# We can explicitly include SIMD instructions in a C program by using [[Inline Assembly Language|Inline Assembler]]. This is obviously architecture-specific, so it is important to use C preprocessor directives to include/exclude this codedepending on the platform for which it is compiled, and to use a generic C implementation on any platform for which you are not providing an inline assembler version.*# ''C Intrinsics'' are function-like capabilities built into extensions to the C language. Although they look like functions, they are compiled inline, and they are used to provide access to features which are not provided by the C compilerlanguage itself. There is a group of intrinsics which provide access to SIMD instructions. However, the benefit of using these over inline assembler is debatable. SIMD intrinsics are not portable, and should be included with C preprocessor directives like inline assembler. * [[Inline Assembly Language]] * C Intrinsics** C Intrinsics are function-like extensions to the C language. Although they look like functions, they are compiled inline, and they are used to provide access to features which are not provided by the C language itself. See the Resources section below for additional detail.
=== Week 5 - Class II ===

Navigation menu