#include "xbt/log.h"
#include "xbt/module.h"
#include <math.h>
+#include "src/surf/surf_interface.hpp"
XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
static void test1(method_t method)
{
- lmm_system_t Sys = NULL;
- lmm_constraint_t L1 = NULL;
- lmm_constraint_t L2 = NULL;
- lmm_constraint_t L3 = NULL;
+ lmm_system_t Sys = nullptr;
+ lmm_constraint_t L1 = nullptr;
+ lmm_constraint_t L2 = nullptr;
+ lmm_constraint_t L3 = nullptr;
- lmm_variable_t R_1_2_3 = NULL;
- lmm_variable_t R_1 = NULL;
- lmm_variable_t R_2 = NULL;
- lmm_variable_t R_3 = NULL;
+ lmm_variable_t R_1_2_3 = nullptr;
+ lmm_variable_t R_1 = nullptr;
+ lmm_variable_t R_2 = nullptr;
+ lmm_variable_t R_3 = nullptr;
double a = 1.0, b = 10.0;
static void test2(method_t method)
{
- lmm_system_t Sys = NULL;
- lmm_constraint_t CPU1 = NULL;
- lmm_constraint_t CPU2 = NULL;
+ lmm_system_t Sys = nullptr;
+ lmm_constraint_t CPU1 = nullptr;
+ lmm_constraint_t CPU2 = nullptr;
- lmm_variable_t T1 = NULL;
- lmm_variable_t T2 = NULL;
+ lmm_variable_t T1 = nullptr;
+ lmm_variable_t T2 = nullptr;
if (method == LAGRANGE_VEGAS)
lmm_set_default_protocol_function(func_vegas_f, func_vegas_fp, func_vegas_fpi);
double **A;
- lmm_system_t Sys = NULL;
- lmm_constraint_t *tmp_cnst = NULL;
- lmm_variable_t *tmp_var = NULL;
+ lmm_system_t Sys = nullptr;
+ lmm_constraint_t *tmp_cnst = nullptr;
+ lmm_variable_t *tmp_var = nullptr;
char **tmp_name;
/*array to add the the constraints of fictitious variables */
int main(int argc, char **argv)
{
- xbt_init(&argc, argv);
+ surf_init(&argc, argv);
XBT_INFO("***** Test 1 (Max-Min)");
test1(MAXMIN);
XBT_INFO("***** Test 3 (Lagrange - Reno)");
test3(LAGRANGE_RENO);
+ surf_exit();
return 0;
}