diff options
author | Georgey | 2017-07-05 11:40:43 +0530 |
---|---|---|
committer | Georgey | 2017-07-05 11:40:43 +0530 |
commit | 938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427 (patch) | |
tree | b343c0ee5609433c80e0de1db8b6886c9126dc2d /thirdparty/linux/include/coin1/CoinDistance.hpp | |
parent | 5b72577efe080c5294b32d804e4d26351fef30bc (diff) | |
download | symphony-938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427.tar.gz symphony-938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427.tar.bz2 symphony-938fef4a37a7b7c61b4b6ff74cb4cfd2f100c427.zip |
Added linux shared libraries and header files for int and ecos functions
Diffstat (limited to 'thirdparty/linux/include/coin1/CoinDistance.hpp')
-rw-r--r-- | thirdparty/linux/include/coin1/CoinDistance.hpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/thirdparty/linux/include/coin1/CoinDistance.hpp b/thirdparty/linux/include/coin1/CoinDistance.hpp new file mode 100644 index 0000000..acaa908 --- /dev/null +++ b/thirdparty/linux/include/coin1/CoinDistance.hpp @@ -0,0 +1,48 @@ +/* $Id: CoinDistance.hpp 1372 2011-01-03 23:31:00Z lou $ */ +// Copyright (C) 2000, International Business Machines +// Corporation and others. All Rights Reserved. +// This code is licensed under the terms of the Eclipse Public License (EPL). + +#ifndef CoinDistance_H +#define CoinDistance_H + +#include <iterator> + +//------------------------------------------------------------------- +// +// Attempt to provide an std::distance function +// that will work on multiple platforms +// +//------------------------------------------------------------------- + +/** CoinDistance + +This is the Coin implementation of the std::function that is +designed to work on multiple platforms. +*/ +template <class ForwardIterator, class Distance> +void coinDistance(ForwardIterator first, ForwardIterator last, + Distance& n) +{ +#if defined(__SUNPRO_CC) + n = 0; + std::distance(first,last,n); +#else + n = std::distance(first,last); +#endif +} + +template <class ForwardIterator> +size_t coinDistance(ForwardIterator first, ForwardIterator last) +{ + size_t retVal; +#if defined(__SUNPRO_CC) + retVal = 0; + std::distance(first,last,retVal); +#else + retVal = std::distance(first,last); +#endif + return retVal; +} + +#endif |