2012-03-21 63 views
2

有沒有辦法包含所有的推力文件,而不是單獨做?例如,現在我必須做到以下幾點:是否可以一次包含所有Thrust標題?

#include <thrust/version.h> 
#include <thrust/host_vector.h> 
#include <thrust/device_vector.h> 
#include <thrust/copy.h> 
#include <thrust/fill.h> 
#include <thrust/sequence.h> 

我只是想使用類似

#include <thrust.h> 

這可能嗎?

+1

你爲什麼要這樣做?你總是可以創建自己的標題,其中包含所有其他標題,但我會認真反對這一點。 – Bart 2012-03-21 18:28:55

+0

你是否可以做到這一個問題,但是否應該這樣做是一個非常不同的問題。 – Moe 2012-03-21 18:31:52

+0

這不是一個好主意,因爲編譯你的項目需要的時間比所需的時間長得多。 – 2012-03-21 19:06:01

回答

2

目前沒有<thrust/everything.h>或等價的標題,所以如果你想要這種功能,你需要自己建立它,如巴特建議。

相關問題