summaryrefslogtreecommitdiff
path: root/libcuda/cuobjdump.h
diff options
context:
space:
mode:
authorNick <[email protected]>2019-09-13 10:48:44 -0400
committerNick <[email protected]>2019-09-13 10:48:44 -0400
commite70fdaa33f694be7241833e8d5a161b432972dcb (patch)
treea31c81cc4e7be9a3f3fd8287ca16ce6e24c68aff /libcuda/cuobjdump.h
parent0215e8047a647f2b8897f26ace86e6de8dfc51d9 (diff)
Add missing changes to the libcuda dir
Diffstat (limited to 'libcuda/cuobjdump.h')
-rw-r--r--libcuda/cuobjdump.h131
1 files changed, 66 insertions, 65 deletions
diff --git a/libcuda/cuobjdump.h b/libcuda/cuobjdump.h
index 6ab6778..38afa4c 100644
--- a/libcuda/cuobjdump.h
+++ b/libcuda/cuobjdump.h
@@ -1,80 +1,81 @@
#ifndef __cuobjdump_h__
#define __cuobjdump_h__
-#include <string>
-#include <list>
#include <iostream>
+#include <list>
+#include <string>
-typedef void * yyscan_t;
+typedef void *yyscan_t;
struct cuobjdump_parser {
- yyscan_t scanner;
- int elfserial;
- int ptxserial;
- FILE *ptxfile;
- FILE *elffile;
- FILE *sassfile;
- char filename [1024];
+ yyscan_t scanner;
+ int elfserial;
+ int ptxserial;
+ FILE *ptxfile;
+ FILE *elffile;
+ FILE *sassfile;
+ char filename[1024];
};
class cuobjdumpSection {
-public:
- //Constructor
- cuobjdumpSection() {
- arch = 0;
- identifier = "";
- }
- virtual ~cuobjdumpSection() {}
- unsigned getArch() {return arch;}
- void setArch(unsigned a) {arch = a;}
- std::string getIdentifier() {return identifier;}
- void setIdentifier(std::string i) {identifier = i;}
- virtual void print(){std::cout << "cuobjdump Section: unknown type" << std::endl;}
-private:
- unsigned arch;
- std::string identifier;
+ public:
+ // Constructor
+ cuobjdumpSection() {
+ arch = 0;
+ identifier = "";
+ }
+ virtual ~cuobjdumpSection() {}
+ unsigned getArch() { return arch; }
+ void setArch(unsigned a) { arch = a; }
+ std::string getIdentifier() { return identifier; }
+ void setIdentifier(std::string i) { identifier = i; }
+ virtual void print() {
+ std::cout << "cuobjdump Section: unknown type" << std::endl;
+ }
+
+ private:
+ unsigned arch;
+ std::string identifier;
};
-class cuobjdumpELFSection : public cuobjdumpSection
-{
-public:
- cuobjdumpELFSection() {}
- virtual ~cuobjdumpELFSection() {
- elffilename = "";
- sassfilename = "";
- }
- std::string getELFfilename() {return elffilename;}
- void setELFfilename(std::string f) {elffilename = f;}
- std::string getSASSfilename() {return sassfilename;}
- void setSASSfilename(std::string f) {sassfilename = f;}
- virtual void print() {
- std::cout << "ELF Section:" << std::endl;
- std::cout << "arch: sm_" << getArch() << std::endl;
- std::cout << "identifier: " << getIdentifier() << std::endl;
- std::cout << "elf filename: " << getELFfilename() << std::endl;
- std::cout << "sass filename: " << getSASSfilename() << std::endl;
- std::cout << std::endl;
- }
-private:
- std::string elffilename;
- std::string sassfilename;
+class cuobjdumpELFSection : public cuobjdumpSection {
+ public:
+ cuobjdumpELFSection() {}
+ virtual ~cuobjdumpELFSection() {
+ elffilename = "";
+ sassfilename = "";
+ }
+ std::string getELFfilename() { return elffilename; }
+ void setELFfilename(std::string f) { elffilename = f; }
+ std::string getSASSfilename() { return sassfilename; }
+ void setSASSfilename(std::string f) { sassfilename = f; }
+ virtual void print() {
+ std::cout << "ELF Section:" << std::endl;
+ std::cout << "arch: sm_" << getArch() << std::endl;
+ std::cout << "identifier: " << getIdentifier() << std::endl;
+ std::cout << "elf filename: " << getELFfilename() << std::endl;
+ std::cout << "sass filename: " << getSASSfilename() << std::endl;
+ std::cout << std::endl;
+ }
+
+ private:
+ std::string elffilename;
+ std::string sassfilename;
};
-class cuobjdumpPTXSection : public cuobjdumpSection
-{
-public:
- cuobjdumpPTXSection(){
- ptxfilename = "";
- }
- std::string getPTXfilename() {return ptxfilename;}
- void setPTXfilename(std::string f) {ptxfilename = f;}
- virtual void print() {
- std::cout << "PTX Section:" << std::endl;
- std::cout << "arch: sm_" << getArch() << std::endl;
- std::cout << "identifier: " << getIdentifier() << std::endl;
- std::cout << "ptx filename: " << getPTXfilename() << std::endl;
- std::cout << std::endl;
- }
-private:
- std::string ptxfilename;
+class cuobjdumpPTXSection : public cuobjdumpSection {
+ public:
+ cuobjdumpPTXSection() { ptxfilename = ""; }
+ std::string getPTXfilename() { return ptxfilename; }
+ void setPTXfilename(std::string f) { ptxfilename = f; }
+ virtual void print() {
+ std::cout << "PTX Section:" << std::endl;
+ std::cout << "arch: sm_" << getArch() << std::endl;
+ std::cout << "identifier: " << getIdentifier() << std::endl;
+ std::cout << "ptx filename: " << getPTXfilename() << std::endl;
+ std::cout << std::endl;
+ }
+
+ private:
+ std::string ptxfilename;
};
#endif /* __cuobjdump_h__ */