Mercurial > hg > graal-jvmci-8
comparison src/gpu/ptx/vm/ptxKernelArguments.hpp @ 11821:d8659ad83fcc
PTX single-threaded array store, Warp annotation
author | Morris Meyer <morris.meyer@oracle.com> |
---|---|
date | Sat, 28 Sep 2013 21:06:12 -0400 |
parents | 91e5f927af63 |
children | c7abc8411011 |
comparison
equal
deleted
inserted
replaced
11820:aeeab846e98c | 11821:d8659ad83fcc |
---|---|
29 #include "runtime/signature.hpp" | 29 #include "runtime/signature.hpp" |
30 | 30 |
31 #define T_BYTE_SIZE 1 | 31 #define T_BYTE_SIZE 1 |
32 #define T_INT_BYTE_SIZE 4 | 32 #define T_INT_BYTE_SIZE 4 |
33 #define T_LONG_BYTE_SIZE 8 | 33 #define T_LONG_BYTE_SIZE 8 |
34 #define T_ARRAY_BYTE_SIZE 8 | |
34 | 35 |
35 class PTXKernelArguments : public SignatureIterator { | 36 class PTXKernelArguments : public SignatureIterator { |
36 public: | 37 public: |
37 // Buffer holding CUdeviceptr values that represent the kernel arguments | 38 // Buffer holding CUdeviceptr values that represent the kernel arguments |
38 char _kernelArgBuffer[1024]; | 39 char _kernelArgBuffer[1024]; |
44 arrayOop _args; | 45 arrayOop _args; |
45 // Current index into _args | 46 // Current index into _args |
46 int _index; | 47 int _index; |
47 // Flag to indicate successful creation of kernel argument buffer | 48 // Flag to indicate successful creation of kernel argument buffer |
48 bool _success; | 49 bool _success; |
50 | |
51 bool _afterInvoocation; | |
49 // Get next java argument | 52 // Get next java argument |
50 oop next_arg(BasicType expectedType); | 53 oop next_arg(BasicType expectedType); |
51 | 54 |
52 public: | 55 public: |
53 PTXKernelArguments(Symbol* signature, arrayOop args, bool is_static) : SignatureIterator(signature) { | 56 PTXKernelArguments(Symbol* signature, arrayOop args, bool is_static) : SignatureIterator(signature) { |
72 | 75 |
73 inline size_t device_argument_buffer_size() { | 76 inline size_t device_argument_buffer_size() { |
74 return _bufferOffset; | 77 return _bufferOffset; |
75 } | 78 } |
76 | 79 |
80 void reiterate() { | |
81 _afterInvoocation = true; | |
82 _bufferOffset = 0; | |
83 _index = 0; | |
84 iterate(); | |
85 } | |
86 | |
87 inline bool is_after_invocation() { | |
88 return _afterInvoocation; | |
89 } | |
90 | |
77 // Get the return oop value | 91 // Get the return oop value |
78 oop get_return_oop(); | 92 oop get_return_oop(); |
79 | 93 |
80 // get device return value ptr | 94 // get device return value ptr |
81 gpu::Ptx::CUdeviceptr get_return_value_ptr() { | 95 gpu::Ptx::CUdeviceptr get_return_value_ptr() { |
84 | 98 |
85 | 99 |
86 void do_byte(); | 100 void do_byte(); |
87 void do_int(); | 101 void do_int(); |
88 void do_long(); | 102 void do_long(); |
103 void do_array(int begin, int end); | |
104 void do_void(); | |
89 | 105 |
90 inline void do_bool() { | 106 inline void do_bool() { |
91 /* TODO : To be implemented */ | 107 /* TODO : To be implemented */ |
92 guarantee(false, "NYI"); | 108 guarantee(false, "do_bool:NYI"); |
93 } | 109 } |
94 inline void do_char() { | 110 inline void do_char() { |
95 /* TODO : To be implemented */ | 111 /* TODO : To be implemented */ |
96 guarantee(false, "NYI"); | 112 guarantee(false, "do_char:NYI"); |
97 } | 113 } |
98 inline void do_short() { | 114 inline void do_short() { |
99 /* TODO : To be implemented */ | 115 /* TODO : To be implemented */ |
100 guarantee(false, "NYI"); | 116 guarantee(false, "do_short:NYI"); |
101 } | 117 } |
102 inline void do_float() { | 118 inline void do_float() { |
103 /* TODO : To be implemented */ | 119 /* TODO : To be implemented */ |
104 guarantee(false, "NYI"); | 120 guarantee(false, "do_float:NYI"); |
105 } | 121 } |
106 inline void do_double() { | 122 inline void do_double() { |
107 /* TODO : To be implemented */ | 123 /* TODO : To be implemented */ |
108 guarantee(false, "NYI"); | 124 guarantee(false, "do_double:NYI"); |
109 } | 125 } |
110 | 126 |
111 inline void do_object() { | 127 inline void do_object() { |
112 /* TODO : To be implemented */ | 128 /* TODO : To be implemented */ |
113 guarantee(false, "NYI"); | 129 guarantee(false, "do_object:NYI"); |
114 } | 130 } |
131 | |
115 inline void do_object(int begin, int end) { | 132 inline void do_object(int begin, int end) { |
116 /* TODO : To be implemented */ | 133 /* TODO : To be implemented */ |
117 guarantee(false, "NYI"); | 134 guarantee(false, "do_object(II):NYI"); |
118 } | 135 } |
119 inline void do_array(int begin, int end) { | 136 |
120 /* TODO : To be implemented */ | |
121 guarantee(false, "NYI"); | |
122 } | |
123 inline void do_void() { | |
124 /* TODO : To be implemented */ | |
125 guarantee(false, "NYI"); | |
126 } | |
127 }; | 137 }; |
128 | 138 |
129 #endif // KERNEL_ARGUMENTS_HPP | 139 #endif // KERNEL_ARGUMENTS_HPP |