Skip to content

Commit

Permalink
Added barrier
Browse files Browse the repository at this point in the history
  • Loading branch information
vb000 committed Aug 1, 2020
1 parent beac2b2 commit 6069db1
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
#include <stdint.h>
#include <stddef.h>

#include "bsg_tile_group_barrier.hpp"

bsg_barrier<bsg_tiles_X, bsg_tiles_Y> barrier;

const size_t VCACHE_NUM_BLOCKS = VCACHE_SET * VCACHE_WAY;
const size_t VCACHE_SIZE_WORDS = VCACHE_NUM_BLOCKS * VCACHE_BLOCK_SIZE_WORDS;

Expand Down Expand Up @@ -76,7 +80,7 @@ int kernel_dram_latency(int dummy) {

// Opens a new page assuming vcache size would be
// a page boundary.
load_vcache_index(VCACHE_NUM_BLOCKS, 0);
if(__bsg_id == 0) load_vcache_index(VCACHE_NUM_BLOCKS, 0);

bsg_cuda_print_stat_kernel_start();
if(__bsg_id == 0) {
Expand All @@ -89,5 +93,7 @@ int kernel_dram_latency(int dummy) {
}
bsg_cuda_print_stat_kernel_end();

barrier.sync();

return 0;
}

0 comments on commit 6069db1

Please sign in to comment.