cdvmDDe (1158399), страница 5

Файл №1158399 cdvmDDe (Раздаточные материалы) 5 страницаcdvmDDe (1158399) страница 52019-09-18СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 5)

ShadowGroupRef sh-group-id;

Note. Source declaration is substituted.

Implementation.

The function ISWFdcltr verifies (besides all) that sh-group-id is declared as void *, and issues a message otherwise.

The function crRef(N,type) changes the type "void*" by the RTL type "ShadowGroupRef".

3.3.4CREATE_SHADOW_GROUP directive

Context and syntax.

DVM(CREATE_SHADOW_GROUP sh-group-id : renewee...);

Proposed compiler output.

DVM_CREATE_SHADOW_GROUP( sh-group-id,

(DVM_SHADOWS(a,k,ls,hs,corner), // for each renewee

...

))

Note. The executable directive is converted to the statement.

Implementation.

The function wfDVMshw() verifies shadow edge width list and issues a message if:

  • ranks mismatch;

  • declared (or default) maximal width is exceeded.

The function wfDVMshad() verifies renewee and issues a message if CORNER is used for 1-D array (warning).

Required subtrees are built by the function wfLX_CRSG. It uses the following functions:

  • Width gets shadow edge width from a directive (or 1 by default);

  • cmpWidth calculates affecting width from the widths, specified in the directive, the declaration, or default one;

  • cSHw builds a comma-list of (low or high) shadow edges;

  • cSG0 builds a macro DVM_SHADOWS for one renewee;

  • cSG builds a list of DVM_SHADOWS for all the renewees.

3.3.5SHADOW_START directive

Context and syntax.

DVM(SHADOW_START sh-group-id);

Proposed compiler output.

DVM_SHADOW_START(sg);

Note. The executable directive is converted to the statement.

Implementation.

The function wfLXIsg verifies sh-group-id and issues a message if it is not defined or not specified as SHADOW_GROUP.

Required subtrees are built by the function wfSHSTART().

3.3.6SHADOW_START clause

Context and syntax.

DVM(PARALLEL ... ; SHADOW_START sh-group-id ... ) ...

Proposed compiler output.

DVM_PAR_SHADOW_START(n,sg); // in loop header

Implementation.

The function wfLXIsg verifies sh-group-id and issues a message if it is not defined or not specified as SHADOW_GROUP.

Required subtrees are built by the function wfSHSTART(). Final tree building is performed by the function Ploop, after the loop is entirely parsed. It inserts early created subtree into appropriate point of a parallel loop shell.

3.3.7SHADOW_WAIT directive

Context and syntax.

DVM(SHADOW_WAIT sh-group-id);

Proposed compiler output.

DVM_SHADOW_WAIT(sg);

Note. The executable directive is converted to the statement.

Implementation.

The function wfLXIsg verifies sh-group-id and issues a message if it is not defined or not specified as SHADOW_GROUP.

Required subtrees are built by the function wfSHWAIT().

3.3.8SHADOW_WAIT clause

Context and syntax.

DVM(PARALLEL ... ; SHADOW_WAIT sh-group-id ...) ...

Proposed compiler output.

DVM_PAR_SHADOW_WAIT(n,sg); // in loop header

Implementation.

The function wfLXIsg verifies sh-group-id and issues a message if it is not defined or not specified as SHADOW_GROUP.

Required subtrees are built by the function wfSHWAIT(). Final tree building is performed by the function Ploop, after the loop is entirely parsed. It inserts early created subtree into appropriate point of a parallel loop shell.

3.4Remote access

3.4.1REMOTE_ACCESS directive and clause

Context and syntax.

DVM(REMOTE_ACCESS ra-reference...)

C-statement

DVM(PARALLEL ... ;

REMOTE_ACCESS [ ra-group : ] ra-reference...

...) ...

ra-reference ::= array [ "["[expr]"]"... ]

Proposed compiler output.

DVM_BLOCK_BEG();

DVM_REMOTE20(arr,buf,k,as,bs);

statements using remote references

DVM_BLOCK_END();

Implementation.

The function wfREMOTE() verifies index expressions and issues a message if they are incorrect. It also keeps information necessary for remote reference recognition and convertion.

Required subtrees are built by the function mk_remote(dir,oper). It uses the functions:

  • mk_rabufid(lx,n) generates an identifier of remote access buffer;

  • mk_radcl(ra) creates declarations of remote access buffers;

  • mk_racrt(ra,rg) creates statements for remote access buffer creation.

3.4.2REMOTE_GROUP directive

Context and syntax.

DVM(REMOTE_GROUP) void * ra-group-id;

Proposed compiler output.

RegularAccessGroupRef ra-group-id;

long RMG_ra-group-id;

Note. Source declaration is substituted. The PREFETCH and RESET operations require a flag variable to control buffer renewing operations.

Implementation.

The function ISWFdcltr verifies (besides all) that ra-group-id is declared as void *, and issues a message otherwise.

The function crRef(N,type) changes the type "void*" by the RTL type "RegularAccessGroupRef" and creates a declaration of flag variable "RMG_...". The function crRMGdcltrs(N) generates a declarator for it.

3.4.3PREFETCH directive

Context and syntax.

DVM(PREFETCH ra-group-id );

Proposed compiler output.

DVM_PREFETCH(rg);

Note. The executable directive is converted to the statement.

Implementation.

The function wfLXIag verifies ra-group-id and issues a message if it is not defined or not specified as REMORE_GROUP.

Required subtrees are built by the function wfPREFETCH().

3.4.4RESET directive

Context and syntax.

DVM(RESET ra-group-id );

Proposed compiler output.

DVM_RESET(rg);

Note. The executable directive is converted to the statement.

Implementation.

The function wfLXIag verifies ra-group-id and issues a message if it is not defined or not specified as REMORE_GROUP.

Required subtrees are built by the function wfRESET().

3.4.5Remote references

Remote references are substituted by references to remote access buffers.

Implementation.

  • The function inRemote() looks for surrounding REMOTE_ACCESS directive;

  • RAfind(N,ra) looks for matching remote reference pattern;

  • RAcmpR(N,ra) compares a reference with the pattern;

  • RAsubstR(N,ra,bufid) creates a reference to the remote access buffer bufid.

3.5Reduction operations

3.5.1REDUCTION_GROUP directive

Context and syntax.

DVM(REDUCTION_GROUP) void * red-group-id;

Proposed compiler output.

RedGroupRef red-group-id;

Note. Source declaration is substituted.

Implementation.

The function ISWFdcltr verifies (besides all) that the red-group-id is declared as void *, and issues a message otherwise.

The function crRef(N,type) changes the type "void*" by the RTL type "RedGroupGroupRef".

3.5.2REDUCTION clause

Context and syntax.

DVM( PARALLEL | TASK_REGION ... ;

REDUCTION [ red-group-id : ] red-operation...

... ) ...

Proposed compiler output.

DVM_CREATE_RG(rg, (

DVM_RVAL(...) | DVM_RLOC(...) // for each operation

...

));

loop creation and mapping

DVM_REDUCTION20(loopid,rg); // insert to the group

loop headers and body

[ DVM_END_REDUCTION(); ] // synchronous reduction

Implementation.

Required subtrees are built by the function wfREDUCTION, namely a list of DVM_RVAR or DVM_RLOC macros for all reduction operations in the directive is created. Final tree building is performed by the function Ploop, after the loop has been entirely parsed. It inserts early created subtree into appropriate point of a parallel loop shell, depending on whether reduction is synchronous or asynchronous.

3.5.3Reduction variables and operations

Context and syntax.

DVM(...; REDUCTION ... MAX(red-var) ... )

DVM(...; REDUCTION ... MIN(red-var) ... )

DVM(...; REDUCTION ... SUM(red-var) ... )

DVM(...; REDUCTION ... PROD(red-var) ... )

DVM(...; REDUCTION ... AND(red-var) ... )

DVM(...; REDUCTION ... OR(red-var) ... )

DVM(...; REDUCTION ... MAXLOC(red-var,loc-var) ... )

DVM(...; REDUCTION ... MINLOC(red-var,loc-var) ... )

Proposed compiler output.

DVM_RVAR(rf_MAX,var,t,l)

DVM_RVAR(rf_MIN,var,t,l)

DVM_RVAR(rf_SUM,var,t,l)

DVM_RVAR(rf_PROD,var,t,l)

DVM_RVAR(rf_AND,var,t,l)

DVM_RVAR(rf_OR,var,t,l)

DVM_RLOC(rf_MAX,var,t,l,loc-var)

DVM_RLOC(rf_MIN,var,t,l,loc-var)

Note. The parameter t is a code of the variable type (rt_INT, rt_LONG, rt_FLOAT, rt_DOUBLE). Parameter l is the number of elements in red-var (if it is an array) or 1.

Implementation.

The function cRG0() creates macro DVM_RVAR or DVM_RLOC for one reduction operation of the list. Its first parameter is RTL's name of the operation which is generated by the function rts_name(t). The function cRG(Ad,N) creates a list of the macros for all operations in a directive.

3.5.4REDUCTION_START directive

Context and syntax.

DVM(REDUCTION_START red-group-id);

Proposed compiler output.

DVM_REDUCTION_START(red-group-id);

Note. The executable directive is converted to the statement.

Implementation.

The function wfLXIrg verifies red-group-id and issues a message if it is not defined or not specified as REDUCTION_GROUP.

Required subtrees are built by the function wfRSTART().

3.5.5REDUCTION_WAIT directive

Context and syntax.

DVM(REDUCTION_WAIT red-group-id);

Proposed compiler output.

Характеристики

Список файлов учебной работы

Свежие статьи
Популярно сейчас
Зачем заказывать выполнение своего задания, если оно уже было выполнено много много раз? Его можно просто купить или даже скачать бесплатно на СтудИзбе. Найдите нужный учебный материал у нас!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
7021
Авторов
на СтудИзбе
260
Средний доход
с одного платного файла
Обучение Подробнее