diff options
| author | Tor Aamodt <[email protected]> | 2010-12-28 17:25:52 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-12-28 17:25:52 -0800 |
| commit | 47afff48be8f59c6cfcb86eded3a337b63130b18 (patch) | |
| tree | 5cc3510b8712c5846741a370c73d0db6dfdd8693 /src/stream_manager.h | |
| parent | e7b3dd442fceb30eaa8008d97429a1d33dad2044 (diff) | |
- parameter memory and active threads now part of kernel_info_t:
Parameters are finalized at kernel launch, which means the contents
of parameter memory are initialized. Kernel arguement names have a
fixed order, hence same address should be assigned on subsequent
kernel launches of same kernel in other streams provided the data size
param_t::size of arguments for each kernel launch is identical (an
assertion has been added to check this is true).
- passing regression
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 8303]
Diffstat (limited to 'src/stream_manager.h')
| -rw-r--r-- | src/stream_manager.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/stream_manager.h b/src/stream_manager.h index d47f0c7..ed3bc9b 100644 --- a/src/stream_manager.h +++ b/src/stream_manager.h @@ -95,23 +95,25 @@ class stream_operation { public: stream_operation() { + m_kernel=NULL; m_type = stream_no_op; m_stream = NULL; m_done=true; } stream_operation( const void *src, const char *symbol, size_t count, size_t offset, struct CUstream_st *stream ) { + m_kernel=NULL; m_stream = stream; m_type=stream_memcpy_to_symbol; m_host_address_src=src; m_symbol=symbol; m_cnt=count; m_offset=offset; - m_done=false; } stream_operation( const char *symbol, void *dst, size_t count, size_t offset, struct CUstream_st *stream ) { + m_kernel=NULL; m_stream = stream; m_type=stream_memcpy_from_symbol; m_host_address_dst=dst; @@ -120,7 +122,7 @@ public: m_offset=offset; m_done=false; } - stream_operation( const kernel_info_t &kernel, bool sim_mode, struct CUstream_st *stream ) + stream_operation( kernel_info_t *kernel, bool sim_mode, struct CUstream_st *stream ) { m_type=stream_kernel_launch; m_kernel=kernel; @@ -130,6 +132,7 @@ public: } stream_operation( class CUevent_st *e, struct CUstream_st *stream ) { + m_kernel=NULL; m_type=stream_event; m_event=e; m_stream=stream; @@ -137,6 +140,7 @@ public: } stream_operation( const void *host_address_src, size_t device_address_dst, size_t cnt, struct CUstream_st *stream ) { + m_kernel=NULL; m_type=stream_memcpy_host_to_device; m_host_address_src =host_address_src; m_device_address_dst=device_address_dst; @@ -149,6 +153,7 @@ public: } stream_operation( size_t device_address_src, void *host_address_dst, size_t cnt, struct CUstream_st *stream ) { + m_kernel=NULL; m_type=stream_memcpy_device_to_host; m_device_address_src=device_address_src; m_host_address_dst=host_address_dst; @@ -161,6 +166,7 @@ public: } stream_operation( size_t device_address_src, size_t device_address_dst, size_t cnt, struct CUstream_st *stream ) { + m_kernel=NULL; m_type=stream_memcpy_device_to_device; m_device_address_src=device_address_src; m_device_address_dst=device_address_dst; @@ -172,8 +178,6 @@ public: m_done=false; } - //void add_barrier( stream_barrier *b ) { m_barrier=b; } - //stream_barrier *get_barrier() { return m_barrier; } bool is_kernel() const { return m_type == stream_kernel_launch; } bool is_mem() const { return m_type == stream_memcpy_host_to_device || @@ -182,7 +186,7 @@ public: } bool is_noop() const { return m_type == stream_no_op; } bool is_done() const { return m_done; } - kernel_info_t &get_kernel() { return m_kernel; } + kernel_info_t *get_kernel() { return m_kernel; } void do_operation( gpgpu_sim *gpu ); void print( FILE *fp ) const; struct CUstream_st *get_stream() { return m_stream; } @@ -204,10 +208,8 @@ private: size_t m_offset; bool m_sim_mode; - kernel_info_t m_kernel; + kernel_info_t *m_kernel; class CUevent_st *m_event; - - //stream_barrier *m_barrier; }; class CUevent_st { |
