Integration in C++ code Log Out | Topics | Search
Moderators | Edit Profile

Discussion about George's Research » METIS - Serial Graph Partitioning » Bug Reports » Integration in C++ code « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Toon Knapen
Posted From: 212.100.178.228
Posted on Thursday, August 26, 2004 - 06:18 am:   

First of all, metis-4.0 can not be compiled with a C++ compiler (because of some constructs that are not allowed in C++). But nor does metis declare its functions to have C linkage in case it is included in a C++ code. It suffices to add following to the headers

#ifdef __cplusplus
extern "C" {
#endif

here comes the current content of the header

#ifdef __cplusplus
}
#endif


Additionally, my code has also bindings for the BLAS functions saxpy and sdot. However METIS also declares _and_ defines these functions. Due to the lack of namespaces in C I therefore recommend to add a prefix 'metis_' to these (or all) functions defined in metis. This makes the code also more consistent IMO. Thus I suggest to rename these functions to metis_saxpy and metis_sdot.

Thanks for this wonderfull library however.
Top of pagePrevious messageNext messageBottom of page Link to this message

desta abadi fetsegu
Posted From: 213.55.95.2
Posted on Tuesday, November 30, 2004 - 01:42 am:   

Hi dear
I need C++ code for solving linear optimization problems

Add Your Message Here
Posting is currently disabled in this topic. Contact your discussion moderator for more information.

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration