diff options
author | Denis Steckelmacher <steckdenis@yahoo.fr> | 2011-07-11 15:47:00 +0200 |
---|---|---|
committer | Denis Steckelmacher <steckdenis@yahoo.fr> | 2011-07-11 15:47:00 +0200 |
commit | 066e6aa1d20b340cd4177ce5a52bbccb51661595 (patch) | |
tree | dbcaa6680a8649fd0d238df903099fed37ff5926 | |
parent | fd9cfb6f082ba5f8c4f3bf63e710d1fd31c08909 (diff) |
No need of thread-local storage in LLVM bitcode when we can have it in CPUDevice
It's cleaner and make stdlib.c less dependent on CPUDevice (it will ease
the port to hardware acceleration).
-rw-r--r-- | src/runtime/stdlib.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/runtime/stdlib.c b/src/runtime/stdlib.c index 58c519e..bacce9f 100644 --- a/src/runtime/stdlib.c +++ b/src/runtime/stdlib.c @@ -3,56 +3,3 @@ /* WARNING: Due to some device-specific things in stdlib.h, the bitcode stdlib * must only be used by CPUDevice, as it's targeted to the host CPU at Clover's * compilation! */ - -/* Global variable that can be used by CPUDevice to store thread-specific data */ -__thread void *g_thread_data; - -/* Stubs of management functions appending g_thread_data to their arguments */ -uint _get_work_dim(void *thread_data); -size_t _get_global_size(void *thread_data, uint dimindx); -size_t _get_global_id(void *thread_data, uint dimindx); -size_t _get_local_size(void *thread_data, uint dimindx); -size_t _get_local_id(void *thread_data, uint dimindx); -size_t _get_num_groups(void *thread_data, uint dimindx); -size_t _get_group_id(void *thread_data, uint dimindx); -size_t _get_global_offset(void *thread_data, uint dimindx); - -uint get_work_dim() -{ - return _get_work_dim(g_thread_data); -} - -size_t get_global_size(uint dimindx) -{ - return _get_global_size(g_thread_data, dimindx); -} - -size_t get_global_id(uint dimindx) -{ - return _get_global_id(g_thread_data, dimindx); -} - -size_t get_local_size(uint dimindx) -{ - return _get_local_size(g_thread_data, dimindx); -} - -size_t get_local_id(uint dimindx) -{ - return _get_local_id(g_thread_data, dimindx); -} - -size_t get_num_groups(uint dimindx) -{ - return _get_num_groups(g_thread_data, dimindx); -} - -size_t get_group_id(uint dimindx) -{ - return _get_group_id(g_thread_data, dimindx); -} - -size_t get_global_offset(uint dimindx) -{ - return _get_global_offset(g_thread_data, dimindx); -} |