1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
/* -*- c-file-style: "GNU" -*- */
/*
* Copyright (C) CNRS, INRIA, Université Bordeaux 1, Télécom SudParis
* See COPYING in top-level directory.
*/
/* simple program that calls the libexample library */
#include <stdlib.h>
#include <stdio.h>
#include "example.h"
#define SIZE (1024*1024)
void appli_function1(double* array, int size) {
fprintf(stderr, "appli function1 (%p, %d)\n", array, size);
compute(10);
}
int main(int argc, char**argv) {
double *double_array = NULL;
int *int_array = NULL;
int func_num = 0;
func_num = example_do_event(func_num);
example_function1(double_array, SIZE);
compute(200000);
func_num = example_do_event(func_num);
example_function2(int_array, SIZE);
compute(200000);
func_num = example_do_event(func_num);
example_fcall(int_array, SIZE);
compute(200000);
func_num = example_do_event(func_num);
example_push(int_array, SIZE);
compute(200000);
func_num = example_do_event(func_num);
example_pop(int_array, SIZE);
compute(200000);
func_num = example_do_event(func_num);
example_event(int_array, SIZE);
compute(200000);
func_num = example_do_event(func_num);
example_set_var(int_array, SIZE);
compute(200000);
func_num = example_do_event(func_num);
example_add_var(int_array, SIZE);
compute(200000);
func_num = example_do_event(func_num);
example_sub_var(int_array, SIZE);
compute(200000);
func_num = example_do_event(func_num);
example_set_var2(int_array, SIZE);
compute(200000);
func_num = example_do_event(func_num);
example_set_var3(int_array, SIZE);
compute(200000);
func_num = example_do_event(func_num);
example_set_var4(int_array, SIZE);
compute(200000);
func_num = example_do_event(func_num);
example_set_var5(int_array, SIZE);
compute(200000);
func_num = example_do_event(func_num);
appli_function1(double_array, SIZE);
compute(200000);
return 0;
}
|