diff --git a/README.md b/README.md index 385afcbabd8b593d926250ad7d4c1a61c378317b..851dd7e74b232472dac6c6c0f4cc91826d361a65 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,10 @@ This function defines the vector which we want to use in equation. `size` is the name of the variable holding the size of the vector. This function expands into an empty string. - `disable_complex` -If the datatype of vectors is either `complex\_float` or `complex\_double`, generated code will by default use complex arithmetic instructions. This macro disables complex arithmetics instruction, and generates code with normal floating point arithmetics. +If the datatype of vectors is either `complex_float` or `complex_double`, generated code will by default use complex arithmetic instructions. This macro disables complex arithmetics instruction, and generates code with normal floating point arithmetics. this function expands into an empty string. -- `sveasmfor(equation)` -`equation` is the equation we want to vectorize. It can be of the following format `output = input1 <+|-|\*|/> input2 [<+|-> input3]`, where `input1`, `input2` or `input3` are the `name` arguments to `svedef()`. If not they will be treated like scalars. This function expand to the actual C code, where vectorization is done via inline assembly. +- `sveasmfor(assign)` +`assign` is the equation we want to vectorize. It can be of the following format `output = input1 <+|-|\*|/> input2 [<+|-> input3]`, where `input1`, `input2` or `input3` are the `name` arguments to `svedef()`. If not they will be treated like scalars. This function expands to the C code, where vectorization is done via inline assembly. - `sveintrfor(equation)` Same as previous, but the code is generated with intrinsic functions. @@ -30,8 +30,8 @@ Lets take an example of zaxpy routine: **y = a * x + y** Create a file named zaxpy with the following content: ``` -svedef(x, complex double, n) -svedef(y, complex double, n) +svedef(x, complex_double, n) +svedef(y, complex_double, n) sveasmfor( y = a ∗ x + y ) ``` @@ -71,3 +71,6 @@ __asm__ volatile /*#####################---sve-generated-code---###################################*/ ``` + +More examples together with the working C code are provided in /examples/ +Running `make` will generate all files from /examples/ into /generated/ directory. It will then compile them with `armclang -march=armv8-a+sve`.