add type-gpu.h

This commit is contained in:
Hieu Hoang 2016-09-02 21:01:58 +01:00
parent 5e2bd46570
commit 113e64043f
6 changed files with 27 additions and 15 deletions

View File

@ -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
View 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;

View File

@ -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;

View File

@ -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,

View File

@ -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)) {}

View File

@ -1,5 +1,6 @@
#pragma once
#include <vector>
#include <string>
#include "types.h"
class Sentence {