mirror of
https://github.com/marian-nmt/marian.git
synced 2025-01-06 00:13:33 +03:00
add type-gpu.h
This commit is contained in:
parent
5e2bd46570
commit
113e64043f
@ -100,6 +100,11 @@
|
|||||||
<type>1</type>
|
<type>1</type>
|
||||||
<locationURI>PARENT-1-PROJECT_LOC/src/common/threadpool.h</locationURI>
|
<locationURI>PARENT-1-PROJECT_LOC/src/common/threadpool.h</locationURI>
|
||||||
</link>
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>common/types-gpu.h</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>PARENT-1-PROJECT_LOC/src/common/types-gpu.h</locationURI>
|
||||||
|
</link>
|
||||||
<link>
|
<link>
|
||||||
<name>common/types.h</name>
|
<name>common/types.h</name>
|
||||||
<type>1</type>
|
<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 EOS = 0;
|
||||||
const Word UNK = 1;
|
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 "ape_penalty.h"
|
||||||
#include "god.h"
|
#include "god.h"
|
||||||
#include "common/vocab.h"
|
#include "common/vocab.h"
|
||||||
|
#include "common/types-gpu.h"
|
||||||
|
|
||||||
ApePenalty::ApePenalty(const std::string& name,
|
ApePenalty::ApePenalty(const std::string& name,
|
||||||
const YAML::Node& config,
|
const YAML::Node& config,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <boost/timer/timer.hpp>
|
#include <boost/timer/timer.hpp>
|
||||||
#include "search.h"
|
#include "search.h"
|
||||||
|
#include "types-gpu.h"
|
||||||
|
|
||||||
Search::Search(size_t threadId)
|
Search::Search(size_t threadId)
|
||||||
: scorers_(God::GetScorers(threadId)) {}
|
: scorers_(God::GetScorers(threadId)) {}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
class Sentence {
|
class Sentence {
|
||||||
|
Loading…
Reference in New Issue
Block a user