This commit is contained in:
Ubuntu 2015-04-11 05:29:07 +00:00
parent 50a66b3855
commit ef13aaf379
2 changed files with 7 additions and 7 deletions

View File

@ -10,7 +10,7 @@
#include "./io.h"
#if RABIT_USE_WORMHOLE == 0
#if RABIT_USE_DMLC == 0
#if RABIT_USE_HDFS
#include "./hdfs-inl.h"
#endif
@ -28,7 +28,7 @@ namespace io {
inline InputSplit *CreateInputSplit(const char *uri,
unsigned part,
unsigned nsplit) {
#if RABIT_USE_WORMHOLE
#if RABIT_USE_DMLC
return dmlc::InputSplit::Create(uri, part, nsplit);
#else
using namespace std;
@ -76,7 +76,7 @@ class StreamAdapter : public Stream {
* \param mode can be 'w' or 'r' for read or write
*/
inline Stream *CreateStream(const char *uri, const char *mode) {
#if RABIT_USE_WORMHOLE
#if RABIT_USE_DMLC
return new StreamAdapter<dmlc::Stream>(dmlc::Stream::Create(uri, mode));
#else
using namespace std;

View File

@ -13,11 +13,11 @@
#define RABIT_USE_HDFS 0
#endif
#ifndef RABIT_USE_WORMHOLE
#define RABIT_USE_WORMHOLE 0
#ifndef RABIT_USE_DMLC
#define RABIT_USE_DMLC 0
#endif
#if RABIT_USE_WORMHOLE
#if RABIT_USE_DMLC
#include <dmlc/io.h>
#endif
/*! \brief io interface */
@ -27,7 +27,7 @@ namespace rabit {
*/
namespace io {
/*! \brief reused SeekStream's definition */
#if RABIT_USE_WORMHOLE
#if RABIT_USE_DMLC
typedef dmlc::SeekStream SeekStream;
typedef dmlc::InputSplit InputSplit;
#else