search for: __remote

Displaying 4 results from an estimated 4 matches for "__remote".

2020 Jun 21
3
Restrict qualifier on class members
Hi, I'm trying to abstract some special pointers with a class, like in the example program below: 1 #define __remote __attribute__((address_space(1))) 2 #include <stdint.h> 3 4 __remote int* A; 5 __remote int* B; 6 7 class RemotePtr { 8 private: 9 __remote int* __restrict a; 10 11 public: 12 RemotePtr(__remote int* a) : a(a) {} 13 14 __remote int& at(int n) { 15...
2020 Jun 22
2
Restrict qualifier on class members
...p, which should do what you intend. > > > Cheers, > > Johannes > > > On 6/21/20 11:56 AM, Bandhav Veluri via llvm-dev wrote: > > Hi, > > I'm trying to abstract some special pointers with a class, like in the > example program below: > > 1 #define __remote __attribute__((address_space(1))) > 2 #include <stdint.h> > 3 > 4 __remote int* A; > 5 __remote int* B; > 6 > 7 class RemotePtr { > 8 private: > 9 __remote int* __restrict a; > 10 > 11 public: > 12 RemotePtr(__remote int* a) : a(...
2020 Jun 24
2
FW: Restrict qualifier on class members
Hi Jeroen, Sorry, I missed that. I tried the patch, and this program: #include <stdint.h> #define __remote __attribute__((address_space(1))) __remote int* A; __remote int* B; void vec_add(__remote int* __restrict a, __remote int* __restrict b, int n) { #pragma unroll 4 for(int i=0; i<n; ++i) { a[i] += b[i]; } } int main(int argc, char** argv) { __remote int* _...
2020 Jun 22
2
Restrict qualifier on class members
...gt; >> > >> > On 6/21/20 11:56 AM, Bandhav Veluri via llvm-dev wrote: >> > >> > Hi, >> > >> > I'm trying to abstract some special pointers with a class, like in the >> > example program below: >> > >> > 1 #define __remote __attribute__((address_space(1))) >> > 2 #include <stdint.h> >> > 3 >> > 4 __remote int* A; >> > 5 __remote int* B; >> > 6 >> > 7 class RemotePtr { >> > 8 private: >> > 9 __remote int* __restrict a;...