In the C programming language, restrict is a keyword, introduced by the C99 standard, that can be used in pointer declarations. By adding this type qualifier, a programmer hints to the compiler that for the lifetime of the pointer, no other pointer will be used to access the object to which it points. This allows the compiler to make optimizations (for example, vectorization) that would not otherwise have been possible.
Attributes | Values |
---|
rdf:type
| |
rdfs:label
| - Restrict (fr)
- Restrict (it)
- Restrict (en)
- Restrict (ru)
- Restrict (uk)
|
rdfs:comment
| - Dans le langage de programmation C, à partir du standard C99, restrict est un mot-clé qui peut être utilisé dans les déclarations de pointeur. Le mot-clé restrict est une déclaration d'intention donnée par le programmeur pour le compilateur. Il indique que pour la durée de vie du pointeur, seul le pointeur lui-même ou une valeur directement issue (comme pointer + 1) sera utilisé pour accéder à l'objet vers lequel il pointe. Cela limite les effets de l'aliasing de pointeur, aidant aux optimisations. Si la déclaration d'intention n'est pas respectée et que l'objet est atteint par un pointeur indépendant, cela se traduira par un comportement indéfini. L'utilisation du mot-clé restrict permet, en principe, d'obtenir la même performance que le même programme écrit en Fortran. (fr)
- In the C programming language, <b>restrict</b> is a keyword, introduced by the C99 standard, that can be used in pointer declarations. By adding this type qualifier, a programmer hints to the compiler that for the lifetime of the pointer, no other pointer will be used to access the object to which it points. This allows the compiler to make optimizations (for example, vectorization) that would not otherwise have been possible. (en)
- La parola chiave restrict è usata nel linguaggio C (a partire dallo standard C99) per qualificare un puntatore come non soggetto ad da parte di altri puntatori non dichiarati a partire da esso. Nel dichiarare un puntatore restrict, il programmatore esegue una dichiarazione di intento, informando il compilatore che, nel suo intero ciclo di vita, solo quel puntatore ed eventualmente altri puntatori derivati a partire da esso saranno usati per accedere all'oggetto puntato. Se la dichiarazione di intento è violata dal programmatore e un altro puntatore è usato per accedere all'oggetto, il comportamento del programma è . (it)
- restrict — ключевое слово в языке программирования C, введённое стандартом C99 и используемое в объявлениях указателей. char * restrict p1;int ** restrict p2;float * restrict p3, * restrict p4; Ключевое слово restrict позволяет программисту сообщить компилятору, что объявляемый указатель адресует область памяти, на которую не ссылается никакой другой указатель. Гарантию того, что на участок памяти не будут ссылаться более одного указателя, даёт программист. При этом оптимизирующий компилятор может генерировать более эффективный код (пример см. ниже). (ru)
- restrict — ключове слово в мові програмування C, введене стандартом C99 і використовуване в оголошеннях вказівників. char * restrict p1;int ** restrict p2;float * restrict p3, * restrict p4; Ключове слово restrict дозволяє програмісту повідомити компілятору, що оголошуваний вказівник адресує ділянку пам'яті, на яку не посилається ніякий інший вказівник. Гарантію того, що на ділянку пам'яті не будуть посилатися інші вказівники, дає програміст. При цьому оптимізувальний компілятор може генерувати ефективніший код (приклад див. нижче). (uk)
|
dcterms:subject
| |
Wikipage page ID
| |
Wikipage revision ID
| |
Link from a Wikipage to another Wikipage
| |
Link from a Wikipage to an external page
| |
sameAs
| |
dbp:wikiPageUsesTemplate
| |
has abstract
| - Dans le langage de programmation C, à partir du standard C99, restrict est un mot-clé qui peut être utilisé dans les déclarations de pointeur. Le mot-clé restrict est une déclaration d'intention donnée par le programmeur pour le compilateur. Il indique que pour la durée de vie du pointeur, seul le pointeur lui-même ou une valeur directement issue (comme pointer + 1) sera utilisé pour accéder à l'objet vers lequel il pointe. Cela limite les effets de l'aliasing de pointeur, aidant aux optimisations. Si la déclaration d'intention n'est pas respectée et que l'objet est atteint par un pointeur indépendant, cela se traduira par un comportement indéfini. L'utilisation du mot-clé restrict permet, en principe, d'obtenir la même performance que le même programme écrit en Fortran. C++ n'a pas de support standard de restrict, mais de nombreux compilateurs ont des équivalents qui fonctionnent habituellement en C++ et en C, tels que __restrict__ pour GCC et Clang , et __restrict et __declspec(restrict) pour Visual C++. (fr)
- In the C programming language, <b>restrict</b> is a keyword, introduced by the C99 standard, that can be used in pointer declarations. By adding this type qualifier, a programmer hints to the compiler that for the lifetime of the pointer, no other pointer will be used to access the object to which it points. This allows the compiler to make optimizations (for example, vectorization) that would not otherwise have been possible. restrict limits the effects of pointer aliasing, aiding optimizations. If the declaration of intent is not followed and the object is accessed by an independent pointer, this will result in undefined behavior. The use of this type qualifier allows C code to achieve the same performance as the same program written in Fortran. (en)
- La parola chiave restrict è usata nel linguaggio C (a partire dallo standard C99) per qualificare un puntatore come non soggetto ad da parte di altri puntatori non dichiarati a partire da esso. Nel dichiarare un puntatore restrict, il programmatore esegue una dichiarazione di intento, informando il compilatore che, nel suo intero ciclo di vita, solo quel puntatore ed eventualmente altri puntatori derivati a partire da esso saranno usati per accedere all'oggetto puntato. Se la dichiarazione di intento è violata dal programmatore e un altro puntatore è usato per accedere all'oggetto, il comportamento del programma è . Tale informazione consente al compilatore di generare codice meglio ottimizzato: in principio, l'aggiunta di restrict allo standard C consente di colmare il divario rispetto a Fortran in applicazioni di calcolo numerico. Lo standard del linguaggio C++ non prevede la parola chiave restrict, ma molti compilatori implementano una parola chiave non-standard che fornisce un effetto analogo alla controparte in C, ad esempio __restrict__ in GCC o __restrict e __declspec(restrict) in Visual C++. (it)
- restrict — ключевое слово в языке программирования C, введённое стандартом C99 и используемое в объявлениях указателей. char * restrict p1;int ** restrict p2;float * restrict p3, * restrict p4; Ключевое слово restrict позволяет программисту сообщить компилятору, что объявляемый указатель адресует область памяти, на которую не ссылается никакой другой указатель. Гарантию того, что на участок памяти не будут ссылаться более одного указателя, даёт программист. При этом оптимизирующий компилятор может генерировать более эффективный код (пример см. ниже). Использование ключевого слова restrict при объявлении других объектов (не указателей) не определено стандартом. При использовании ключевого слова restrict программа, написанная на «умном» C, может сравниться по скорости с программой, написанной на «глупом» Fortran. В языке C++ нет ключевого слова restrict (не описано в стандарте), но разработчики разных компиляторов C++ добавили аналогичные по назначению ключевые слова, например:
* __restrict и __restrict__ у GNU Compiler Collection;
* __restrict и __declspec(restrict) у Visual C++;
* __restrict__ у Clang. (ru)
- restrict — ключове слово в мові програмування C, введене стандартом C99 і використовуване в оголошеннях вказівників. char * restrict p1;int ** restrict p2;float * restrict p3, * restrict p4; Ключове слово restrict дозволяє програмісту повідомити компілятору, що оголошуваний вказівник адресує ділянку пам'яті, на яку не посилається ніякий інший вказівник. Гарантію того, що на ділянку пам'яті не будуть посилатися інші вказівники, дає програміст. При цьому оптимізувальний компілятор може генерувати ефективніший код (приклад див. нижче). Використання ключового слова restrict при оголошенні інших об'єктів (не вказівників) стандартом не визначено. При використанні ключового слова restrict програма, написана на «розумному» C, може зрівнятися за швидкістю з програмою, написаною на «дурному» Fortran. У мові C++ немає ключового слова restrict (не описано в стандарті), але розробники різних компіляторів C++ додали аналогічні за призначенням ключові слова, наприклад:
* __restrict і __restrict__ у GNU Compiler Collection;
* __restrict і __declspec(restrict) у Visual C++;
* __restrict__ у Clang. (uk)
|
gold:hypernym
| |
prov:wasDerivedFrom
| |
page length (characters) of wiki page
| |
foaf:isPrimaryTopicOf
| |
is Link from a Wikipage to another Wikipage
of | |
is Wikipage redirect
of | |
is foaf:primaryTopic
of | |