comparison src/gpu/ptx/vm/gpu_ptx.hpp @ 11527:c99e65785936

Improvements to PTX codegen; allows more PTX tests that run on the device to pass.
author bharadwaj
date Wed, 04 Sep 2013 10:47:37 -0400
parents 49bb1bc983c6
children 365d8f385fb5
comparison
equal deleted inserted replaced
11526:db297343d44e 11527:c99e65785936
85 private: 85 private:
86 typedef int (*cuda_cu_init_func_t)(unsigned int); 86 typedef int (*cuda_cu_init_func_t)(unsigned int);
87 typedef int (*cuda_cu_ctx_create_func_t)(void*, int, int); 87 typedef int (*cuda_cu_ctx_create_func_t)(void*, int, int);
88 typedef int (*cuda_cu_ctx_destroy_func_t)(void*); 88 typedef int (*cuda_cu_ctx_destroy_func_t)(void*);
89 typedef int (*cuda_cu_ctx_synchronize_func_t)(void); 89 typedef int (*cuda_cu_ctx_synchronize_func_t)(void);
90 typedef int (*cuda_cu_ctx_set_current_func_t)(void*);
90 typedef int (*cuda_cu_device_get_count_func_t)(int*); 91 typedef int (*cuda_cu_device_get_count_func_t)(int*);
91 typedef int (*cuda_cu_device_get_name_func_t)(char*, int, int); 92 typedef int (*cuda_cu_device_get_name_func_t)(char*, int, int);
92 typedef int (*cuda_cu_device_get_func_t)(int*, int); 93 typedef int (*cuda_cu_device_get_func_t)(int*, int);
93 typedef int (*cuda_cu_device_compute_capability_func_t)(int*, int*, int); 94 typedef int (*cuda_cu_device_compute_capability_func_t)(int*, int*, int);
94 typedef int (*cuda_cu_device_get_attribute_func_t)(int*, int, int); 95 typedef int (*cuda_cu_device_get_attribute_func_t)(int*, int, int);
96 unsigned int, unsigned int, unsigned int, 97 unsigned int, unsigned int, unsigned int,
97 unsigned int, unsigned int, unsigned int, 98 unsigned int, unsigned int, unsigned int,
98 unsigned int, void*, void**, void**); 99 unsigned int, void*, void**, void**);
99 typedef int (*cuda_cu_module_get_function_func_t)(void*, void*, const char*); 100 typedef int (*cuda_cu_module_get_function_func_t)(void*, void*, const char*);
100 typedef int (*cuda_cu_module_load_data_ex_func_t)(void*, void*, unsigned int, void*, void**); 101 typedef int (*cuda_cu_module_load_data_ex_func_t)(void*, void*, unsigned int, void*, void**);
101 typedef int (*cuda_cu_memalloc_func_t)(void*, unsigned int); 102 typedef int (*cuda_cu_memalloc_func_t)(void*, size_t);
102 typedef int (*cuda_cu_memfree_func_t)(gpu::Ptx::CUdeviceptr); 103 typedef int (*cuda_cu_memfree_func_t)(gpu::Ptx::CUdeviceptr);
103 typedef int (*cuda_cu_memcpy_htod_func_t)(gpu::Ptx::CUdeviceptr, const void*, unsigned int); 104 typedef int (*cuda_cu_memcpy_htod_func_t)(gpu::Ptx::CUdeviceptr, const void*, unsigned int);
104 typedef int (*cuda_cu_memcpy_dtoh_func_t)(const void*, gpu::Ptx::CUdeviceptr, unsigned int); 105 typedef int (*cuda_cu_memcpy_dtoh_func_t)(const void*, gpu::Ptx::CUdeviceptr, unsigned int);
105 106
106 public: 107 public:
118 static cuda_cu_module_load_data_ex_func_t _cuda_cu_module_load_data_ex; 119 static cuda_cu_module_load_data_ex_func_t _cuda_cu_module_load_data_ex;
119 static cuda_cu_memalloc_func_t _cuda_cu_memalloc; 120 static cuda_cu_memalloc_func_t _cuda_cu_memalloc;
120 static cuda_cu_memfree_func_t _cuda_cu_memfree; 121 static cuda_cu_memfree_func_t _cuda_cu_memfree;
121 static cuda_cu_memcpy_htod_func_t _cuda_cu_memcpy_htod; 122 static cuda_cu_memcpy_htod_func_t _cuda_cu_memcpy_htod;
122 static cuda_cu_memcpy_dtoh_func_t _cuda_cu_memcpy_dtoh; 123 static cuda_cu_memcpy_dtoh_func_t _cuda_cu_memcpy_dtoh;
124 static cuda_cu_ctx_set_current_func_t _cuda_cu_ctx_set_current;
123 125
124 protected: 126 protected:
125 static void* _device_context; 127 static void* _device_context;
126 static int _cu_device; 128 static int _cu_device;
127 }; 129 };