mirror of
https://github.com/Steffo99/unimore-hpc-assignments.git
synced 2024-11-26 10:04:23 +00:00
Run format document to indent code using tabs
This commit is contained in:
parent
f0394d1b3b
commit
f4a903371a
1 changed files with 72 additions and 81 deletions
|
@ -18,9 +18,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Array initialization. */
|
/* Array initialization. */
|
||||||
static void init_array(int nx, int ny,
|
static void init_array(int nx, int ny, DATA_TYPE POLYBENCH_2D(A, NX, NY, nx, ny), DATA_TYPE POLYBENCH_1D(x, NY, ny))
|
||||||
DATA_TYPE POLYBENCH_2D(A, NX, NY, nx, ny),
|
|
||||||
DATA_TYPE POLYBENCH_1D(x, NY, ny))
|
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
|
@ -39,8 +37,7 @@ static void init_array(int nx, int ny,
|
||||||
|
|
||||||
/* DCE code. Must scan the entire live-out data.
|
/* DCE code. Must scan the entire live-out data.
|
||||||
Can be used also to check the correctness of the output. */
|
Can be used also to check the correctness of the output. */
|
||||||
static void print_array(int nx,
|
static void print_array(int nx, DATA_TYPE POLYBENCH_1D(y, NX, nx))
|
||||||
DATA_TYPE POLYBENCH_1D(y, NX, nx))
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -54,10 +51,7 @@ static void print_array(int nx,
|
||||||
|
|
||||||
/* Main computational kernel. The whole function will be timed,
|
/* Main computational kernel. The whole function will be timed,
|
||||||
including the call and return. */
|
including the call and return. */
|
||||||
static void kernel_atax(int nx, int ny,
|
static void kernel_atax(int nx, int ny, DATA_TYPE POLYBENCH_2D(A, NX, NY, nx, ny), DATA_TYPE POLYBENCH_1D(x, NY, ny), DATA_TYPE POLYBENCH_1D(y, NY, ny))
|
||||||
DATA_TYPE POLYBENCH_2D(A, NX, NY, nx, ny),
|
|
||||||
DATA_TYPE POLYBENCH_1D(x, NY, ny),
|
|
||||||
DATA_TYPE POLYBENCH_1D(y, NY, ny))
|
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
|
@ -102,10 +96,7 @@ int main(int argc, char **argv)
|
||||||
init_array(nx, ny, POLYBENCH_ARRAY(A), POLYBENCH_ARRAY(x));
|
init_array(nx, ny, POLYBENCH_ARRAY(A), POLYBENCH_ARRAY(x));
|
||||||
|
|
||||||
/* Run kernel. */
|
/* Run kernel. */
|
||||||
kernel_atax(nx, ny,
|
kernel_atax(nx, ny, POLYBENCH_ARRAY(A), POLYBENCH_ARRAY(x), POLYBENCH_ARRAY(y));
|
||||||
POLYBENCH_ARRAY(A),
|
|
||||||
POLYBENCH_ARRAY(x),
|
|
||||||
POLYBENCH_ARRAY(y));
|
|
||||||
|
|
||||||
/* Stop and print timer. */
|
/* Stop and print timer. */
|
||||||
polybench_stop_instruments;
|
polybench_stop_instruments;
|
||||||
|
|
Loading…
Reference in a new issue