Skip to content

Commit

Permalink
remove array initialisation from time
Browse files Browse the repository at this point in the history
  • Loading branch information
nikiosna committed Mar 5, 2017
1 parent 1f20505 commit 4edacc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CudaTestDouble.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ public static float run(int n, boolean memory) {
CUcontext context = new CUcontext();
cuCtxCreate(context, 0, device);

if(memory) t1 = System.nanoTime();

// Load the ptx file.
CUmodule module = new CUmodule();
cuModuleLoad(module, "module/vectoradd_double.ptx");
Expand All @@ -36,6 +34,8 @@ public static float run(int n, boolean memory) {
hostInputB[i] = (double) i;
}

if(memory) t1 = System.nanoTime();

// Allocate the device input data, and copy the
// host input data to the device
CUdeviceptr deviceInputA = new CUdeviceptr();
Expand Down
4 changes: 2 additions & 2 deletions CudaTestFloat.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ public static float run(int n, boolean memory) {
CUcontext context = new CUcontext();
cuCtxCreate(context, 0, device);

if(memory) t1 = System.nanoTime();

// Load the ptx file.
CUmodule module = new CUmodule();
cuModuleLoad(module, "module/vectoradd_float.ptx");
Expand All @@ -36,6 +34,8 @@ public static float run(int n, boolean memory) {
hostInputB[i] = (float) i;
}

if(memory) t1 = System.nanoTime();

// Allocate the device input data, and copy the
// host input data to the device
CUdeviceptr deviceInputA = new CUdeviceptr();
Expand Down

0 comments on commit 4edacc1

Please sign in to comment.