A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't read a comm after completion since it is auto-destroyed now.
[simgrid.git]
/
src
/
gras
/
Virtu
/
rl_emul.c
diff --git
a/src/gras/Virtu/rl_emul.c
b/src/gras/Virtu/rl_emul.c
index
922f227
..
5ed5a65
100644
(file)
--- a/
src/gras/Virtu/rl_emul.c
+++ b/
src/gras/Virtu/rl_emul.c
@@
-1,8
+1,7
@@
-/* $Id$ */
-
/* rl_emul - Emulation support (real life) */
/* rl_emul - Emulation support (real life) */
-/* Copyright (c) 2003-5 Arnaud Legrand, Martin Quinson. All rights reserved.*/
+/* Copyright (c) 2005, 2006, 2009, 2010. The SimGrid Team.
+ * All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-11,35
+10,55
@@
#include "gras/Virtu/virtu_rl.h"
#include "gras_modinter.h"
#include "gras/Virtu/virtu_rl.h"
#include "gras_modinter.h"
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(emul,gras,"Emulation support");
+XBT_LOG_NEW_SUBCATEGORY(gras_virtu_emul, gras_virtu, "Emulation support");
+
+/*** CPU burning */
+void gras_cpu_burn(double flops)
+{
+ while (flops > 0) {
+ flops -= 2;
+ }
+}
+
/*** Timing macros: nothing to do in RL. Actually do the job and shutup ***/
/*** Timing macros: nothing to do in RL. Actually do the job and shutup ***/
-void gras_emul_init(void) {}
-void gras_emul_exit(void) {}
+void gras_emul_init(void)
+{
+}
-int gras_bench_always_begin(const char *location,int line) {
+void gras_emul_exit(void)
+{
+}
+
+int gras_bench_always_begin(const char *location, int line)
+{
return 0;
}
return 0;
}
-int gras_bench_always_end(void) {
+int gras_bench_always_end(void)
+{
return 0;
}
return 0;
}
-int gras_bench_once_begin(const char *location,int line) {
+int gras_bench_once_begin(const char *location, int line)
+{
return 1;
}
return 1;
}
-int gras_bench_once_end(void) {
+int gras_bench_once_end(void)
+{
return 0;
}
/*** Conditional execution support ***/
return 0;
}
/*** Conditional execution support ***/
-int gras_if_RL(void) {
- return 1;
+int gras_if_RL(void)
+{
+ return 1;
}
}
-int gras_if_SG(void) {
- return 0;
+int gras_if_SG(void)
+{
+ return 0;
}
}