fdvmDDe (1158418), страница 4

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

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

*DVM$ DISTRIBUTE :: …

the sequence of statements to create distributed array is produced.

void RealignArray (

SgSymbol
SgSymbol
int
int
int
SgStatement

*als,
*tgs,
iaxis
nr
new_sign,
*stal );

als

- pointer to the symbol of realigned array

tgs

- pointer to the symbol of the alignment target array

iaxis

- the aligning rules are stored

in the elements of reserved array dvm000 : dvm000(iaxis),

dvm000(iaxis+1),...

nr

- the number of aligning rules

new_sign

- the flag that defines whether the contents of realigned array

should be updated or not

stal

- pointer to the REALIGN directive

Generates statement to realign the array:

dvm000(i) = realn(...)

and inserts it in procedure in place of REALIGN directive.

void AllocateArray (

SgStatement
distribute_list

*stmt,
*distr );

stmt

- pointer to the statement of ALLOCATE function call

distribute_list

- DISTRIBUTE directive list

If the POINTER variable in left part of assignment statement stmt has DISTRIBUTE attribute then AllocDistArray( ) function is called else AllocAlignArray( ) function is called.

void AllocateDistArray (

SgSymbol
SgExpression
SgStatement
SgStatement

*p,
*desc,
*stdis
*stmt );

p

- pointer to the symbol of POINTER variable

desc

- pointer to the descriptor reference expression

(descriptor - vector of the dimension sizes of dynamic array)

stdis

- pointer to the DISTRIBUTE directive specifying p

stmt

- pointer to the statement of ALLOCATE function call:

p = ALLOCATE(desc,...)

Generates the statements to create Lib-DVM object and allocate a memory for dynamic array declared with DISTRIBUTE attribute and for all the arrays immediately or ultimately aligned with it, and inserts these statements in procedure in place of statement stmt.

void AllocateAlignArray(

SgSymbol
SgExpression
SgStatement

*p,
*desc,
*stmt );

p

- pointer to the symbol of POINTER variable

desc

- pointer to the descriptor reference expression

(descriptor - vector of the dimension sizes of dynamic array)

stmt

- pointer to the statement of ALLOCATE function call:

p = ALLOCATE(desc,...)

The function generates the statements for creating distributed array declared with ALIGN and POINTER attributes and for the arrays aligned with it , and inserts these statements in procedure in place of statement stmt.

AlignTreeAlloc( ) and AlignAllocArray( ) are called.

void AlignTreeAlloc ( align *root )

root

- pointer to the alignment tree root

Traverses the alignment tree and calls the function AlignAllocArray() to create distributed arrays for the nodes of tree that are corresponds to the aligned arrays not having POINTER attribute.

void AlignAllocArray(

align
align
int
int
SgExpression

*node,
*root,
nr
iaxis
*desc );

node

- pointer to the alignment tree node that corresponds to the aligned

array with attribute POINTER

root

- pointer to the alignment tree node that corresponds to the array

node is aligned with

nr

- the number of the aligning rules

iaxis

- the aligning rules (AxisArray(nr), CoefArray(nr), ConstArray(nr))

are stored in the elements of reserved array dvm000 :

dvm000(iaxis),

dvm000(iaxis+1),...

desc

- pointer to the descriptor reference expression

(descriptor - vector of the dimension sizes of dynamic array)

Generates the statements to create LibDVM object and allocate a memory for dynamic array declared with ALIGN attribute and inserts these statements in procedure in place of statement pointer = ALLOCATE(desc,...).

void ArrayHeader (

SgSymbol
int

*ar,
ind );

ar

- pointer to the symbol of array

ind

- 0, if ar is POINTER

1, if ar is distributed array

n, where dvm000(n)is element storing pointer to the abstract

machine representation, if ar is TEMPLATE

-1, if ar is declared as array with postponed distribution.

Adds the attribute (ARRAY_HEADER) to the symbol of distributed object ar (ind - is value of attribute).

5.1.2Distributed array referencing

void DistArrayRef (

SgExpression
int
SgStatement

*e,
modified
*st );

e

- pointer to the array reference expression

modified

- flag specifing whether array reference occurs in left or right part

of assignment statement

st

- pointer to the statement where the array reference occurs.

Linearizes distributed array element reference, that is, replaces reference

A(I1,I2, ..., IN)

by

N

base(A(N+2) + I1 +  A(N-j+2) * Ij )

i=2

where A - distributed array name,

base - i0000m , if A is of type integer

r0000m , if A is of type real

d0000m , if A is of type double precision

c0000m , if A is of type complex

l0000m , if A is of type logical

SgExpression *LinearForm (

SgSymbol
SgExpression

*ar,
*el );

ar

- pointer to the symbol of distributed array

el

- pointer to the subscript list (I1,I2, ..., IN) of array reference

Generates the expression

A(N+2) + I1 +  A(N-j+2) * Ij

where A - distributed array name.

void ChangeDistArrayRef ( SgExpression *e )

e

- pointer to the expression

Traverses the expression e and linearizes each distributed array element reference (calls DistArrayRef( )).

void ChangeDistArrayRef_Left ( SgExpression *e )

e

- pointer to the expression

Traverses the expression e in left part of assignment statement and linearizes distributed array element reference (calls DistArrayRef( )).

void ChangeArg_DistArrayRef ( SgExpression *ele )

ele

- pointer to the expression that is an actual argument of procedure

Traverses the expression ele and linearizes distributed array element references, except whole array reference.

void DebugVarArrayRef(

SgExpression
SgStatement

*e,
*stmt );

e

- pointer to the expression

stmt

- pointer to the statement that contains the expression e

The function traverses the expression e and linearizes each distributed array element reference (calling DistArrayRef( )). If compilation mode is set on debugging this function inserts the statements before stmt to check values of the variables during the execution in debugging mode.

void DebugVarArrayRef_Left (

SgExpression
SgStatement
SgStatement

*e,
*stmt
*stcur );

e

- pointer to the expression in left part of assignment statement

stmt

- pointer to the assignment statement that contains the expression e

stcur

- pointer to the statement after which new statements should be

inserted.

The function traverses the expression e and linearizes each distributed array element reference. If compilation mode is set on debugging this function inserts the Debugger calls after stcur and after stmt to check values of the variables during the execution in debugging mode.

void DebugArg_VarArrayRef (

SgExpression
SgStatement

*ele,
*stmt );

ele

- pointer to the expression that is an actual argument of procedure

stmt

- pointer to the statement that contains the expression e

The function traverses the expression e and linearizes each distributed array element reference except whole array reference. If compilation mode is set on debugging this function inserts the statements before stmt to check values of the variables during the execution in debugging mode.

5.1.3Parallel loop

void ParallelLoop ( SgStatement *stmt )

stmt

- pointer to the PARALLEL directive

The parallel loop:

*DVM$ PARALLEL (I1, ..., In) ON A(…)...

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

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

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