test/src [v3] clean up

Tá an tiomantas seo le fáil i:
Aditya Atluri
2016-03-16 05:30:29 -05:00
tuismitheoir 8f527d2288
tiomantas 9b772c8553
+5 -4
Féach ar an gComhad
@@ -24,7 +24,7 @@ THE SOFTWARE.
#include<stdio.h>
#include<malloc.h>
#define LEN 1024*1024
#define LEN 1024
#define SIZE LEN * sizeof(float)
#define ITER 1024*1024
@@ -67,15 +67,16 @@ int main(){
dim3 dimBlock(512,1,1);
Inc1<<<dimGrid, dimBlock>>>(Ad);
A[0] = -(ITER*1.0f);
std::cout<<A[0]<<std::endl;
std::cout<<"Same cache line before completion: \t"<< A[0]<<std::endl;
cudaDeviceSynchronize();
std::cout<<A[0]<<std::endl;
std::cout<<"Same cache line after completion: \t"<< A[0]<<std::endl;
for(int i=0;i<LEN;i++){
A[i] = 0.0f;
}
Inc2<<<dimGrid, dimBlock>>>(Ad);
A[0] = -(ITER*1.0f);
std::cout<<"Diff cache line before completion: \t"<<A[0]<<std::endl;
cudaDeviceSynchronize();
std::cout<<A[0]<<std::endl;
std::cout<<"Diff cache line after completion: \t"<<A[0]<<std::endl;
}