Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix copyright headers
[simgrid.git] / src / gras / Virtu / rl_emul.c
1 /* rl_emul - Emulation support (real life)                                  */
2
3 /* Copyright (c) 2005, 2006, 2009, 2010. The SimGrid Team.
4  * All rights reserved.                                                     */
5
6 /* This program is free software; you can redistribute it and/or modify it
7  * under the terms of the license (GNU LGPL) which comes with this package. */
8
9 #include "gras/emul.h"
10 #include "gras/Virtu/virtu_rl.h"
11 #include "gras_modinter.h"
12
13 XBT_LOG_NEW_SUBCATEGORY(gras_virtu_emul, gras_virtu, "Emulation support");
14
15 /*** CPU burning */
16 void gras_cpu_burn(double flops) {
17   while (flops>0) {
18     flops-=2;
19   }
20 }
21
22
23 /*** Timing macros: nothing to do in RL. Actually do the job and shutup ***/
24
25 void gras_emul_init(void)
26 {
27 }
28
29 void gras_emul_exit(void)
30 {
31 }
32
33 int gras_bench_always_begin(const char *location, int line)
34 {
35   return 0;
36 }
37
38 int gras_bench_always_end(void)
39 {
40   return 0;
41 }
42
43 int gras_bench_once_begin(const char *location, int line)
44 {
45   return 1;
46 }
47
48 int gras_bench_once_end(void)
49 {
50   return 0;
51 }
52
53 /*** Conditional execution support ***/
54
55 int gras_if_RL(void)
56 {
57   return 1;
58 }
59
60 int gras_if_SG(void)
61 {
62   return 0;
63 }