mirror of
https://github.com/marian-nmt/marian.git
synced 2024-09-17 09:47:34 +03:00
small fixes to make things compile and pass regression tests
This commit is contained in:
parent
7bb558ecfc
commit
7447dcba4f
@ -85,10 +85,10 @@ find_library(MKL_CORE_LIBRARY
|
||||
set(MKL_INCLUDE_DIRS ${MKL_INCLUDE_DIR})
|
||||
set(MKL_LIBRARIES ${MKL_INTERFACE_LIBRARY} ${MKL_SEQUENTIAL_LAYER_LIBRARY} ${MKL_CORE_LIBRARY})
|
||||
|
||||
message("1 ${MKL_INCLUDE_DIR}")
|
||||
message("2 ${MKL_INTERFACE_LIBRARY}")
|
||||
message("3 ${MKL_SEQUENTIAL_LAYER_LIBRARY}")
|
||||
message("4 ${MKL_CORE_LIBRARY}")
|
||||
# message("1 ${MKL_INCLUDE_DIR}")
|
||||
# message("2 ${MKL_INTERFACE_LIBRARY}")
|
||||
# message("3 ${MKL_SEQUENTIAL_LAYER_LIBRARY}")
|
||||
# message("4 ${MKL_CORE_LIBRARY}")
|
||||
|
||||
if (MKL_INCLUDE_DIR AND
|
||||
MKL_INTERFACE_LIBRARY AND
|
||||
|
@ -29,3 +29,14 @@ std::basic_istream<CharT,Traits>& GetLine(std::basic_istream<CharT,Traits>& in,
|
||||
line.pop_back();
|
||||
return in;
|
||||
}
|
||||
|
||||
// wrapper around std::getline() that handles Windows input files with extra CR chars at the line end
|
||||
template< class CharT, class Traits, class Allocator >
|
||||
std::basic_istream<CharT,Traits>& GetLine(std::basic_istream<CharT,Traits>& in,
|
||||
std::basic_string<CharT,Traits,Allocator>& line,
|
||||
CharT delim) {
|
||||
std::getline(in, line, delim);
|
||||
if (in && !line.empty() && line.back() == in.widen('\r')) // strip terminal CR if present
|
||||
line.pop_back();
|
||||
return in;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "common/config.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
// Constants for Iris example
|
||||
const int NUM_FEATURES = 4;
|
||||
|
Loading…
Reference in New Issue
Block a user