summaryrefslogtreecommitdiff
path: root/libcuda/gpgpu_context.h
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-06-05 23:28:12 -0400
committerMengchi Zhang <[email protected]>2019-06-05 23:28:12 -0400
commitd553124832aca461dda4dd7d503748d22b44bbe2 (patch)
treec69651448ecf13e427237df85bd31f5d508bbfdd /libcuda/gpgpu_context.h
parentfea710871ec72ea9515e14c228edd60fbd4e6241 (diff)
Add cuda_api_object and move some var
Signed-off-by: Mengchi Zhang <[email protected]>
Diffstat (limited to 'libcuda/gpgpu_context.h')
-rw-r--r--libcuda/gpgpu_context.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/libcuda/gpgpu_context.h b/libcuda/gpgpu_context.h
index d6e564b..576ec67 100644
--- a/libcuda/gpgpu_context.h
+++ b/libcuda/gpgpu_context.h
@@ -1,4 +1,9 @@
+#ifndef __gpgpu_context_h__
+#define __gpgpu_context_h__
#include <list>
+#include <map>
+#include <set>
+#include "cuda_api_object.h"
class cuobjdumpSection;
class cuobjdumpELFSection;
@@ -6,13 +11,23 @@ class cuobjdumpPTXSection;
class gpgpu_context {
public:
+ gpgpu_context() {
+ api = new cuda_runtime_api();
+ }
+ // global list
std::list<cuobjdumpSection*> cuobjdumpSectionList;
+ //maps sm version number to set of filenames
+ std::map<unsigned, std::set<std::string> > version_filename;
+ cuda_runtime_api* api;
+ // member function list
void cuobjdumpInit();
void cuobjdumpParseBinary(unsigned int handle);
void extract_code_using_cuobjdump();
std::list<cuobjdumpSection*> pruneSectionList(CUctx_st *context);
std::list<cuobjdumpSection*> mergeMatchingSections(std::string identifier);
std::list<cuobjdumpSection*> mergeSections();
- cuobjdumpELFSection* findELFSection(const std::string identifier, std::list<cuobjdumpSection*> &libSectionList);
- cuobjdumpPTXSection* findPTXSection(const std::string identifier, std::list<cuobjdumpSection*> &libSectionList);
+ cuobjdumpELFSection* findELFSection(const std::string identifier);
+ cuobjdumpPTXSection* findPTXSection(const std::string identifier);
+ void extract_ptx_files_using_cuobjdump(CUctx_st *context);
};
+#endif /* __gpgpu_context_h__ */