Skip to content

Commit a5ec9be

Browse files
committed
rename pending cta to allocated_ctas
1 parent 3d38c05 commit a5ec9be

File tree

3 files changed

+13
-27
lines changed

3 files changed

+13
-27
lines changed

src/abstract_hardware_model.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ kernel_info_t::kernel_info_t(dim3 gridDim, dim3 blockDim,
782782
num_blocks() * entry->gpgpu_ctx->device_runtime->g_TB_launch_latency;
783783

784784
cache_config_set = false;
785-
pending_ctas = 0;
785+
allocated_ctas = 0;
786786
}
787787

788788
/*A snapshot of the texture mappings needs to be stored in the kernel's info as
@@ -816,7 +816,7 @@ kernel_info_t::kernel_info_t(
816816
cache_config_set = false;
817817
m_NameToCudaArray = nameToCudaArray;
818818
m_NameToTextureInfo = nameToTextureInfo;
819-
pending_ctas = 0;
819+
allocated_ctas = 0;
820820
}
821821

822822
kernel_info_t::~kernel_info_t() {

src/abstract_hardware_model.h

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,7 @@ class kernel_info_t {
248248
}
249249
bool running() const { return m_num_cores_running > 0; }
250250
bool done() const { return no_more_ctas_to_run() && !running(); }
251-
class function_info *entry() {
252-
return m_kernel_entry;
253-
}
251+
class function_info *entry() { return m_kernel_entry; }
254252
const class function_info *entry() const { return m_kernel_entry; }
255253

256254
size_t num_blocks() const {
@@ -300,9 +298,7 @@ class kernel_info_t {
300298
std::list<class ptx_thread_info *> &active_threads() {
301299
return m_active_threads;
302300
}
303-
class memory_space *get_param_memory() {
304-
return m_param_mem;
305-
}
301+
class memory_space *get_param_memory() { return m_param_mem; }
306302

307303
// The following functions access texture bindings present at the kernel's
308304
// launch
@@ -369,7 +365,7 @@ class kernel_info_t {
369365

370366
// Jin: kernel timing
371367
public:
372-
unsigned pending_ctas;
368+
unsigned allocated_ctas;
373369
unsigned long long launch_cycle;
374370
unsigned long long start_cycle;
375371
unsigned long long end_cycle;
@@ -473,7 +469,7 @@ class simt_stack {
473469
m_active_mask(),
474470
m_recvg_pc(-1),
475471
m_branch_div_cycle(0),
476-
m_type(STACK_ENTRY_TYPE_NORMAL){};
472+
m_type(STACK_ENTRY_TYPE_NORMAL) {};
477473
};
478474

479475
std::deque<simt_stack_entry> m_stack;
@@ -610,15 +606,9 @@ class gpgpu_t {
610606
void memcpy_from_gpu(void *dst, size_t src_start_addr, size_t count);
611607
void memcpy_gpu_to_gpu(size_t dst, size_t src, size_t count);
612608

613-
class memory_space *get_global_memory() {
614-
return m_global_mem;
615-
}
616-
class memory_space *get_tex_memory() {
617-
return m_tex_mem;
618-
}
619-
class memory_space *get_surf_memory() {
620-
return m_surf_mem;
621-
}
609+
class memory_space *get_global_memory() { return m_global_mem; }
610+
class memory_space *get_tex_memory() { return m_tex_mem; }
611+
class memory_space *get_surf_memory() { return m_surf_mem; }
622612

623613
void gpgpu_ptx_sim_bindTextureToArray(const struct textureReference *texref,
624614
const struct cudaArray *array);
@@ -1338,9 +1328,7 @@ class core_t {
13381328
virtual bool warp_waiting_at_barrier(unsigned warp_id) const = 0;
13391329
virtual void checkExecutionStatusAndUpdate(warp_inst_t &inst, unsigned t,
13401330
unsigned tid) = 0;
1341-
class gpgpu_sim *get_gpu() {
1342-
return m_gpu;
1343-
}
1331+
class gpgpu_sim *get_gpu() { return m_gpu; }
13441332
void execute_warp_inst_t(warp_inst_t &inst, unsigned warpId = (unsigned)-1);
13451333
bool ptx_thread_done(unsigned hw_thread_id) const;
13461334
virtual void updateSIMTStack(unsigned warpId, warp_inst_t *inst);
@@ -1350,9 +1338,7 @@ class core_t {
13501338
void get_pdom_stack_top_info(unsigned warpId, unsigned *pc,
13511339
unsigned *rpc) const;
13521340
kernel_info_t *get_kernel_info() { return m_kernel; }
1353-
class ptx_thread_info **get_thread_info() {
1354-
return m_thread;
1355-
}
1341+
class ptx_thread_info **get_thread_info() { return m_thread; }
13561342
unsigned get_warp_size() const { return m_warp_size; }
13571343
void and_reduction(unsigned ctaid, unsigned barid, bool value) {
13581344
reduction_storage[ctaid][barid] &= value;

src/gpgpu-sim/shader.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4566,9 +4566,9 @@ unsigned simt_core_cluster::issue_block2core() {
45664566
}
45674567
}
45684568
if (kernel) {
4569-
if (kernel->pending_ctas < kernel->num_blocks()) {
4569+
if (kernel->allocated_ctas < kernel->num_blocks()) {
45704570
m_core[core]->pending_ctas.push_back(kernel);
4571-
kernel->pending_ctas++;
4571+
kernel->allocated_ctas++;
45724572
}
45734573
}
45744574
}

0 commit comments

Comments
 (0)