Add some global variables
This commit is contained in:
parent
0bf68f9909
commit
6169bdb7b5
12
src/main.cpp
12
src/main.cpp
@ -1,18 +1,28 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "Stream.h"
|
#include "Stream.h"
|
||||||
#include "CUDAStream.h"
|
#include "CUDAStream.h"
|
||||||
|
|
||||||
|
|
||||||
|
const unsigned int ARRAY_SIZE = 52428800;
|
||||||
|
|
||||||
|
#define IMPLEMENTATION_STRING "CUDA"
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
std::cout
|
std::cout
|
||||||
<< "GPU-STREAM" << std::endl
|
<< "GPU-STREAM" << std::endl
|
||||||
<< "Version:" << VERSION_STRING << std::endl
|
<< "Version:" << VERSION_STRING << std::endl
|
||||||
<< "Implementation: " << std::endl;
|
<< "Implementation: " << IMPLEMENTATION_STRING << std::endl;
|
||||||
|
|
||||||
|
|
||||||
|
// Create host vectors
|
||||||
|
std::vector<double> a(ARRAY_SIZE, 1.0);
|
||||||
|
std::vector<double> b(ARRAY_SIZE, 2.0);
|
||||||
|
std::vector<double> c(ARRAY_SIZE, 0.0);
|
||||||
|
|
||||||
Stream<double> *stream;
|
Stream<double> *stream;
|
||||||
stream = new CUDAStream<double>();
|
stream = new CUDAStream<double>();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user