Skip to content

Commit 9fcd9bb

Browse files
committed
metis int chosen based on HighsInt
1 parent 7dbc058 commit 9fcd9bb

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

extern/Metis/Changes.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@ Changes:
2626

2727
- Any function not needed to call METIS_NodeND has been removed.
2828

29-
- The input matrix (xadj and adjncy) is const.
29+
- The input matrix (xadj and adjncy) is const.
30+
31+
- The Metis integer type is defined based on HIGHSINT64.

extern/Metis/metis.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
\version\verbatim $Id$\endverbatim
88
*/
99

10-
#ifndef _METIS_H_
11-
#define _METIS_H_
10+
#ifndef HIGHS_METIS_ORDERING_H
11+
#define HIGHS_METIS_ORDERING_H
1212

1313
/****************************************************************************
1414
* A set of defines that can be modified by the user
@@ -30,7 +30,11 @@
3030
GCC does provides these definitions in stdint.h, but it may require some
3131
modifications on other architectures.
3232
--------------------------------------------------------------------------*/
33-
#ifndef IDXTYPEWIDTH
33+
#include "HConfig.h"
34+
35+
#ifdef HIGHSINT64
36+
#define IDXTYPEWIDTH 64
37+
#else
3438
#define IDXTYPEWIDTH 32
3539
#endif
3640

@@ -41,9 +45,7 @@
4145
32 : single precision floating point (float)
4246
64 : double precision floating point (double)
4347
--------------------------------------------------------------------------*/
44-
#ifndef REALTYPEWIDTH
45-
#define REALTYPEWIDTH 32
46-
#endif
48+
#define REALTYPEWIDTH 32
4749

4850
/****************************************************************************
4951
* In principle, nothing needs to be changed beyond this point, unless the

highs/ipm/hipo/factorhighs/Analyse.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,11 @@
99
#include "AMD/amd.h"
1010
#include "DataCollector.h"
1111
#include "FactorHiGHSSettings.h"
12+
#include "Metis/metis.h"
1213
#include "ReturnValues.h"
1314
#include "ipm/hipo/auxiliary/Auxiliary.h"
1415
#include "ipm/hipo/auxiliary/Log.h"
1516

16-
// define correct int type for Metis and AMD before header is included
17-
#ifdef HIGHSINT64
18-
#define IDXTYPEWIDTH 64
19-
#else
20-
#define IDXTYPEWIDTH 32
21-
#endif
22-
#include "Metis/metis.h"
23-
2417
namespace hipo {
2518

2619
const Int64 int32_limit = std::numeric_limits<int32_t>::max();

0 commit comments

Comments
 (0)