diff --git a/SSE/README.md b/SSE/README.md index e472a5c66e10df5916b2204af7a662d407205596..75aea12afb26541574cd0c28160ba2c8dc46341b 100644 --- a/SSE/README.md +++ b/SSE/README.md @@ -68,7 +68,7 @@ raise range raw_input ##### Using a variable and lists ##### -Define a variable '''my_list''' that contents a list of integers: +Define a variable ```my_list``` that contents a list of integers: ``` In [2]: my_list= range(10) @@ -218,11 +218,11 @@ An empty linear array of 1000 elements: ```python a= numpy.empty(1000,numpy.float32) ``` -A linear array of 1000 elements with all values set to '''zero''' : +A linear array of 1000 elements with all values set to ```zero``` : ```python a= numpy.zeros(1000,numpy.float32) ``` -A linear array of 1000 elements with all values set to '''one''' : +A linear array of 1000 elements with all values set to ```one``` : ```python a= numpy.ones(1000,numpy.float32) ``` @@ -379,7 +379,7 @@ see https://github.com/GuillermoAndrade/inline for more information. Actually, Python is compiled using C language and is possible to call functions from a shared library using C interface. For C++ functions python need to pass throw a C wrapper function that negotiate conversion from pure C parameters and C++ class objects in real C++ functions. ### Hello world with Inline ### -Imagine a C function that take a string parameter "text" and print a message : +Imagine a C function that take a string parameter `text` and print a message : ```c #include <stdio.h> @@ -522,8 +522,8 @@ It's time to integrate NumPy and Inline to have benchmark program for optimizat ### Benchmark code ### This code define a benchmark for test a classical procedure in linear algebra packages : SAXPY in a particular case. This code use others optional arguments in call of Inline : -* '''extra_compile_args''' : Compilation arguments to allow to use SSE and OpenMP instructions -* '''extra_link_args''' : link arguments to allow to use SSE and OpenMP instructions +* ```extra_compile_args``` : Compilation arguments to allow to use SSE and OpenMP instructions +* ```extra_link_args``` : link arguments to allow to use SSE and OpenMP instructions ```python import numpy @@ -627,7 +627,7 @@ print("speed up for SSE = " + str(referenceTime/SSETime)) ### SAXPY ### -SAXPY is a classical linear algebra routine that take '''X''' and '''Y''' arrays of float in parameters an produce an a output Y = Y + alpha *X. Where `alpha` is a scalar input parameter. +SAXPY is a classical linear algebra routine that take `X` and `Y` arrays of float in parameters an produce an a output `Y = Y + alpha *X`. Where `alpha` is a scalar input parameter. In this tutorial we are interesting in computation performance of SAXPY in case where we need to cumulate 1000 iterative call of this function: ```c @@ -636,7 +636,7 @@ for(int j=0; j< numberIterations;j++) ``` ### SSE version of SAXPY ### -In benchmark, we have a reference code of the function SAXPY in '''referenceCode''' string and a code to be changed in '''SSECode'''. +In benchmark, we have a reference code of the function SAXPY in ```referenceCode``` string and a code to be changed in ```SSECode```. 1. Modify SSECode to compute SAXPY using SSE instructions