diff options
| author | Tor Aamodt <[email protected]> | 2010-08-08 23:57:43 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-08-08 23:57:43 -0800 |
| commit | 06d6f3bb15f4c1dc56943304696ac83b36413907 (patch) | |
| tree | 95ea0c28ede4f251f8ad8e2aef0d06f5c37087bb /src/cuda-sim/cuda-sim.h | |
| parent | 529b3a65b65536e20f6a1dab135233f52d19bcf3 (diff) | |
refactor: shader.cc free of extern declarations
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7176]
Diffstat (limited to 'src/cuda-sim/cuda-sim.h')
| -rw-r--r-- | src/cuda-sim/cuda-sim.h | 55 |
1 files changed, 52 insertions, 3 deletions
diff --git a/src/cuda-sim/cuda-sim.h b/src/cuda-sim/cuda-sim.h index 2c5e0a7..7e05f7e 100644 --- a/src/cuda-sim/cuda-sim.h +++ b/src/cuda-sim/cuda-sim.h @@ -2,6 +2,7 @@ #define CUDASIM_H_INCLUDED #include "../abstract_hardware_model.h" +#include "dram_callback.h" #include <stdlib.h> #include <map> #include <string> @@ -17,10 +18,16 @@ extern int g_debug_execution; extern int g_debug_thread_uid; extern std::map<std::string,function_info*> *g_kernel_name_to_function_lookup; -extern void gpgpu_cuda_ptx_sim_init_grid(const char *kernel_key,struct gpgpu_ptx_sim_arg *args, struct dim3 gridDim, struct dim3 blockDim ); -extern void gpgpu_opencl_ptx_sim_init_grid(class function_info *entry,struct gpgpu_ptx_sim_arg *args, struct dim3 gridDim, struct dim3 blockDim ); +extern void gpgpu_cuda_ptx_sim_init_grid( const char *kernel_key, + struct gpgpu_ptx_sim_arg *args, + struct dim3 gridDim, + struct dim3 blockDim ); +extern void gpgpu_opencl_ptx_sim_init_grid(class function_info *entry, + struct gpgpu_ptx_sim_arg *args, + struct dim3 gridDim, + struct dim3 blockDim ); extern void gpgpu_cuda_ptx_sim_main_func( const char *kernel_key, dim3 gridDim, dim3 blockDim, struct gpgpu_ptx_sim_arg *); -extern void print_splash(); +extern void print_splash(); extern void* gpgpu_ptx_sim_malloc( size_t count ); extern void* gpgpu_ptx_sim_mallocarray( size_t count ); extern void gpgpu_ptx_sim_memcpy_to_gpu( size_t dst_start_addr, const void *src, size_t count ); @@ -43,5 +50,47 @@ extern void read_sim_environment_variables(); extern void register_function_implementation( const char *name, function_info *impl ); extern void ptxinfo_cuda_addinfo(); extern void ptxinfo_opencl_addinfo( std::map<std::string,function_info*> &kernels ); +extern void ptx_sim_free_sm( class ptx_thread_info** thread_info ); +unsigned ptx_sim_init_thread( class ptx_thread_info** thread_info, + int sid, + unsigned tid, + unsigned threads_left, + unsigned num_threads, + class core_t *core, + unsigned hw_cta_id, + unsigned hw_warp_id ); +unsigned ptx_sim_cta_size(); +const struct gpgpu_ptx_sim_kernel_info* ptx_sim_kernel_info(); +void set_option_gpgpu_spread_blocks_across_cores(int option); +int ptx_thread_done( void *thd ); +unsigned ptx_thread_donecycle( void *thr ); +int ptx_thread_get_next_pc( void *thd ); +void* ptx_thread_get_next_finfo( void *thd ); +int ptx_thread_at_barrier( void *thd ); +int ptx_thread_all_at_barrier( void *thd ); +unsigned long long ptx_thread_get_cta_uid( void *thd ); +void ptx_thread_reset_barrier( void *thd ); +void ptx_thread_release_barrier( void *thd ); +void ptx_print_insn( address_type pc, FILE *fp ); +unsigned int ptx_set_tex_cache_linesize( unsigned linesize); +void ptx_decode_inst( void *thd, + unsigned *op, + int *i1, + int *i2, + int *i3, + int *i4, + int *o1, + int *o2, + int *o3, + int *o4, + int *vectorin, + int *vectorout, + int *arch_reg ); +void ptx_exec_inst( void *thd, + address_type *addr, + memory_space_t *space, + unsigned *data_size, + dram_callback_t* callback, + unsigned warp_active_mask ); #endif |
