Originally posted by: SystemAdmin
In general, you should use CPXX methods no matter what.
On a 64bit architecture the situation is as follows:
Internally CPLEX works with 32bit variable indices and 64bit non-zero counts. This allows you to have up to 2^31-1 variables and up to 2^63-1 non-zeros.
The API offered by the CPX methods only works with 32bit non-zero counts. So if you use this API then CPLEX has to transform the 32bit non-zero counts to 64bit non-zero counts. This may introduce some overhead during model build time or when adding cuts (although the overhead is probably not too big).
The API provided by the CPXX methods uses types CPXDIM for variable indices and CPXNNZ for non-zero counts. These types expand to the actual types CPLEX uses internally. So if you consistently use CPXDIM, CPXNNZ and CPXX methods then no data transformation will occur.
Moreover, on a 32bit architecture the library internally uses 32bit non-zero counts only. The CPXX API takes care of this fact and if you use CPXDIM, CPXNNZ and CPXX methods consistently your code will not produce any data transformation, regardless of the architecture you compiler for is 32bit or 64bit.
To cut a long story short: If you use the CPX methods then data transformation may need to happen between your code and the core engine, if you use the CPXX methods no such transformation will be required.
#CPLEXOptimizers#DecisionOptimization