Skip to content
Snippets Groups Projects
Commit 2c2bfd69 authored by Bine Brank's avatar Bine Brank
Browse files

updated readme

parent 6813c5b4
No related branches found
No related tags found
No related merge requests found
...@@ -14,10 +14,10 @@ This function defines the vector which we want to use in equation. ...@@ -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. `size` is the name of the variable holding the size of the vector.
This function expands into an empty string. This function expands into an empty string.
- `disable_complex` - `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. this function expands into an empty string.
- `sveasmfor(equation)` - `sveasmfor(assign)`
`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. `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)` - `sveintrfor(equation)`
Same as previous, but the code is generated with intrinsic functions. 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** ...@@ -30,8 +30,8 @@ Lets take an example of zaxpy routine: **y = a * x + y**
Create a file named zaxpy with the following content: Create a file named zaxpy with the following content:
``` ```
svedef(x, complex double, n) svedef(x, complex_double, n)
svedef(y, complex double, n) svedef(y, complex_double, n)
sveasmfor( y = a ∗ x + y ) sveasmfor( y = a ∗ x + y )
``` ```
...@@ -71,3 +71,6 @@ __asm__ volatile ...@@ -71,3 +71,6 @@ __asm__ volatile
/*#####################---sve-generated-code---###################################*/ /*#####################---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`.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment