diff options
| author | Mengchi Zhang <[email protected]> | 2019-06-07 01:01:19 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-06-07 01:01:19 -0400 |
| commit | f99838eca06b3f9a281987bc230f4ae5b8426d69 (patch) | |
| tree | 1df79e540ddd59b54f345c8ece5d73dd3e5f3ae7 /libcuda/gpgpu_context.h | |
| parent | 9d6f9463769908755174c7b84b5720dc9cd24e42 (diff) | |
| parent | ba8374c72558e4b89a0bddc973bcc87a10e2ab5f (diff) | |
Merge pull request #11 from echoedit/dev
Dev
Diffstat (limited to 'libcuda/gpgpu_context.h')
| -rw-r--r-- | libcuda/gpgpu_context.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libcuda/gpgpu_context.h b/libcuda/gpgpu_context.h index f29e2e0..7569ea6 100644 --- a/libcuda/gpgpu_context.h +++ b/libcuda/gpgpu_context.h @@ -15,10 +15,24 @@ class kernel_info_t; typedef std::list<gpgpu_ptx_sim_arg> gpgpu_ptx_sim_arg_list_t; +#ifndef OPENGL_SUPPORT +typedef unsigned long GLuint; +#endif + +struct glbmap_entry { + GLuint m_bufferObj; + void *m_devPtr; + size_t m_size; + struct glbmap_entry *m_next; +}; + +typedef struct glbmap_entry glbmap_entry_t; + class gpgpu_context { public: gpgpu_context() { api = new cuda_runtime_api(); + g_glbmap = NULL; } // global list std::list<cuobjdumpSection*> cuobjdumpSectionList; @@ -28,6 +42,10 @@ class gpgpu_context { std::map<unsigned long long, size_t> g_mallocPtr_Size; //maps sm version number to set of filenames std::map<unsigned, std::set<std::string> > version_filename; + std::map<void *,void **> pinned_memory; //support for pinned memories added + std::map<void *, size_t> pinned_memory_size; + glbmap_entry_t* g_glbmap; + // objects pointers for each file cuda_runtime_api* api; // member function list void cuobjdumpInit(); |
