mirror of
https://github.com/marian-nmt/marian.git
synced 2024-12-13 05:41:06 +03:00
add type-gpu.h
This commit is contained in:
parent
5e2bd46570
commit
113e64043f
@ -100,6 +100,11 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/src/common/threadpool.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>common/types-gpu.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/src/common/types-gpu.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>common/types.h</name>
|
||||
<type>1</type>
|
||||
|
18
src/common/types-gpu.h
Normal file
18
src/common/types-gpu.h
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <thrust/device_vector.h>
|
||||
#include <thrust/functional.h>
|
||||
#include <thrust/sort.h>
|
||||
#include <thrust/sequence.h>
|
||||
#include <thrust/extrema.h>
|
||||
|
||||
template<class T>
|
||||
using DeviceVector = thrust::device_vector<T>;
|
||||
|
||||
template<class T>
|
||||
using HostVector = thrust::host_vector<T>;
|
||||
|
||||
namespace algo = thrust;
|
||||
namespace iteralgo = thrust;
|
||||
|
||||
|
@ -10,17 +10,3 @@ typedef std::vector<Word> Words;
|
||||
const Word EOS = 0;
|
||||
const Word UNK = 1;
|
||||
|
||||
#include <thrust/device_vector.h>
|
||||
#include <thrust/functional.h>
|
||||
#include <thrust/sort.h>
|
||||
#include <thrust/sequence.h>
|
||||
#include <thrust/extrema.h>
|
||||
|
||||
template<class T>
|
||||
using DeviceVector = thrust::device_vector<T>;
|
||||
|
||||
template<class T>
|
||||
using HostVector = thrust::host_vector<T>;
|
||||
|
||||
namespace algo = thrust;
|
||||
namespace iteralgo = thrust;
|
@ -1,6 +1,7 @@
|
||||
#include "ape_penalty.h"
|
||||
#include "god.h"
|
||||
#include "common/vocab.h"
|
||||
#include "common/types-gpu.h"
|
||||
|
||||
ApePenalty::ApePenalty(const std::string& name,
|
||||
const YAML::Node& config,
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <boost/timer/timer.hpp>
|
||||
#include "search.h"
|
||||
#include "types-gpu.h"
|
||||
|
||||
Search::Search(size_t threadId)
|
||||
: scorers_(God::GetScorers(threadId)) {}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "types.h"
|
||||
|
||||
class Sentence {
|
||||
|
Loading…
Reference in New Issue
Block a user