summaryrefslogtreecommitdiff
path: root/src/tr1_hash_map.h
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-07-15 18:09:46 -0800
committerTor Aamodt <[email protected]>2010-07-15 18:09:46 -0800
commit69f2911e04ffb1b19eef1fafb8c040af271f656e (patch)
tree231d3b6bdc3a202f7c255bfcf7bf2c36e32cee9e /src/tr1_hash_map.h
creating branch for adding support for CUDA 3.x and Fermi
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6829]
Diffstat (limited to 'src/tr1_hash_map.h')
-rw-r--r--src/tr1_hash_map.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tr1_hash_map.h b/src/tr1_hash_map.h
new file mode 100644
index 0000000..3f31576
--- /dev/null
+++ b/src/tr1_hash_map.h
@@ -0,0 +1,19 @@
+#pragma once
+
+// detection and fallback for unordered_map in C++0x
+#ifdef __cplusplus
+ #ifdef __GNUC__
+ #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 3
+ #include <unordered_map>
+ #define tr1_hash_map std::unordered_map
+ #else
+ #include <map>
+ #define tr1_hash_map std::map
+ #endif
+ #else
+ #include <map>
+ #define tr1_hash_map std::map
+ #endif
+#endif
+
+