search for: assign4

Displaying 2 results from an estimated 2 matches for "assign4".

Did you mean: assign
2020 Feb 20
2
Given one restrict pointer based on another, should they never alias?
...n, if you don't mind. What if we have code somewhat similar to your example in assign3() but it's in C++ and the pointer derived from x is stored in a class member field: class S { public: S(int *d): data(d) {} int *getData() { return data; } private: int *__restrict__ data; }; void assign4(int *pA, long N) { int *__restrict__ x = pA; int tmp; { S s(x + N); tmp = *s.getData(); } *x = tmp; } I see that the full restrict implementation says that the load and the store do not alias. Is this by design? On Sat, Feb 15, 2020 at 9:00 AM Jeroen Dobbelaere < Jeroen.Dobb...
2020 Feb 14
2
Given one restrict pointer based on another, should they never alias?
We recently found an issue when using the full restrict implementation developed by Jeroen; it surfaces when compiling an obscure combination of std::valarray and std::indirect_array but I don't want to bore you with all the details. What it boils down to is this basic question about restrict: Given one restrict pointer based on another, should they never alias? As far as I understand the