diff options
| author | Jonathan <[email protected]> | 2018-05-24 15:35:05 -0700 |
|---|---|---|
| committer | Jonathan <[email protected]> | 2018-05-25 09:11:55 -0700 |
| commit | 006006efb4290f007ec96f0c2e6023d53e7601ff (patch) | |
| tree | 54cc95aa70650d8f62be60970727b212c59cb8a7 /src/cuda-sim/cuda-sim.cc | |
| parent | 14db8e9d45ff253ae79376c7e8e4dc4cb06042b6 (diff) | |
changed assertion to warning when binding to previously bound name.
Diffstat (limited to 'src/cuda-sim/cuda-sim.cc')
| -rw-r--r-- | src/cuda-sim/cuda-sim.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc index 2a197c3..34368ce 100644 --- a/src/cuda-sim/cuda-sim.cc +++ b/src/cuda-sim/cuda-sim.cc @@ -157,7 +157,9 @@ void gpgpu_t::gpgpu_ptx_sim_bindTextureToArray(const struct textureReference* te std::map<std::string,const struct cudaArray*>::const_iterator t=m_NameToCudaArray.find(texname); //check that there's nothing there first - assert(t == m_NameToCudaArray.end()); + if(t != m_NameToCudaArray.end()){ + printf("GPGPU-Sim PTX: Warning: binding to texref associated with %s, which was previously bound.\nImplicitly unbinding texref associated to %s first\n", texname.c_str(), texname.c_str()); + } m_NameToCudaArray[texname] = array; unsigned int texel_size_bits = array->desc.w + array->desc.x + array->desc.y + array->desc.z; unsigned int texel_size = texel_size_bits/8; |
