rtsIDe (1158448), страница 8

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

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

When the function align_ is called the parameters of the alignment rule Fj(I1,...,In)= {Aj*Ik + Bj} for the j-th pattern dimension have to be defined as follows:

AxisArray[j-1]

contains value k;

CoeffArray[j-1]

contains value Aj;

ConstArray[j-1]

contains value Bj.

To define alignment rule Fj(I1, ... ,In) with image in set of all values of the index variable of j-th dimension of template for any I1, ... ,In, the value AxisArray[j-1] (k value) has to be set to -1. The values CoeffArray[j-1] and ConstArray[j-1] are irrelevant in this case.

The number of the alignment rules has to be equal to the rank of the pattern, when the function align_ is called.

The function returns non-zero value, if mapped array has a local part on the current processor, and zero otherwise.

Note. The distributed array mapping, specified for function align_, may be implemented only in the case, if for all the processors, at least one array element is mapped onto, a local size of each array dimension, obtained as a result of mapping, is not less than widths of high and low shadow edges of the dimension.

7.2Alignments superposition

Let the function G defines the location of the n-dimensional array in the space of the r-dimensional pattern; and let the function P defines the location of the r-dimensional array in the space of the m-dimensional pattern:

G((I1, ... ,Ii, ... ,In)) =

G1(I1, ... ,Ii, ... ,In)
. . . . . . . . . . . . . . .
G
k(I1, ... ,Ii, ... ,In)
. . . . . . . . . . . . . . .
G
r(I1, ... ,Ii, ... ,In)

P((J1, ... ,Jj, ... ,Jr)) =

P1(J1, ... ,Jj, ... ,Jr)
. . . . . . . . . . . . . . .
P
s(J1, ... ,Jj, ... ,Jr)
. . . . . . . . . . . . . . .
P
m(J1, ... ,Jj, ... ,Jr)

Then the result of alignment P (by function align_) of r-dimensional array PatternDA in m-dimensional pattern Pattern space; and of next alignment G of n-dimensional array DA in r-dimensional array PatternDA space is alignment F of n-dimensional array DA in m-dimensional pattern Pattern space. F is a product (superposition) of P and G:

F((I1, ... ,Ii, ... ,In)) = P * G =

U{P(v)} =

V  G((I1, ... ,In))

F1(I1, ... ,Ii, ... ,In) 
. . . . . . . . . . . . . .
Fs(I1, ... ,Ii, ... ,In) 
. . . . . . . . . . . . . .
Fm(I1, ... ,Ii, ... ,In)

The coordinate alignment rules Fs (0 s m) from F mapping are a superposition of the coordinate alignment rules for P and G mappings:

1. Let Ps((J1, ... ,Jr)) = { q  Ms: 0  q  MAXs } , where:

MAXs

maximum of the index variable of the s-th dimension of Pattern;

Ms

range of values of the index variable of the pattern Pattern s-th dimension.

Then Fs(I1, ... ,In) ) = Ms, that is the full replication of the array DA along the s-th dimension of the pattern Pattern.

2.

Let

Ps((J1, ... ,Jr)) = Cs*Jk + Ds and
Gk((I1, ... ,In)) = Qk*Il + Rk ,

where:

Jk

index variable of the k-th dimension of the array PatternDA;

Il

index variable of the l-th dimension of the array DA;

Cs, Qs

integers;

Dk, Rk

nonnegative integers.

Then Fs((I1, ... ,In)) = As*Il + Bs , where As = Cs*Qk and Bs = Cs*Rk + Ds.

3.

Let

Ps((J1, ... ,Jr)) = Cs*Jk + Ds and
Gk((I1, ... ,In)) = { q Mk: 0  q  MAXk } ,

where:

Jk

index variable of the k-th dimension of the array PatternDA;

Cs

integer;

Ds

nonnegative integer;

MAXk

maximum of the index variable of the k-th dimension of the array PatternDA;

Mk

range of values of the index variable of the PatternDA array k-th dimension.

Then

Fs((I1, ... ,In)) =

U {Cs*Jk + Ds} ,
Jk  Mk

that is the partial replication (stretched by the linear function Ps) of the array DA along the s-th dimension of the pattern Pattern.

The described alignment F is equivalent to the sequence of the alignments P and G. Consider the case, when the pattern Pattern is not an abstract machine representation. Then it is aligned by some function Q with another pattern. In this case, the alignment functions F and Q may be substituted by their superposition Q*F. So, the resulting alignment of the array DA with the abstract machine representation can be built substituting sequential alignment functions by their superposition (Run-Time System does it to align the array DA by the pattern PatternDA when the function align_ is called).

7.3Realigning distributed array

long realn_(

long
PatternRef
long
long
long
long

ArrayHeader[],
*PatternRefPtr,
AxisArray[],
CoeffArray[],
ConstArray[],
*NewSignPtr );

ArrayHeader

the header of the distributed array to be realigned.

*PatternRefPtr

reference to the alignment pattern.

AxisArray

array, which j-th element is a dimension number of the distributed array used in linear alignment rule for pattern (j+1)-th dimension.

CoeffArray

array, which j-th element is a coefficient for the distributed array index variable used in linear alignment rule for the pattern (j+1)-th dimension.

ConstArray

array, which j-th element is a constant used in the linear alignment rule for the pattern (j+1)-th dimension.

*NewSignPtr

the flag of updating of the distributed array (to be equal to 1).

The function realn_ cancels the allocation of the distributed array with header *ArrayHeaderPtr, defined previously by the function align_(or malign_, see section 7.5). The function sets a new allocation for this array according to the parameters AxisArray, CoefArray and ConstArray. If this array has been used as pattern of alignment of some arrays, nevertheless the allocations of these arrays are not changed.

As remapped distributed array, as alignment pattern must be mapped on the current processor system or its subsystem (perhaps, each one on its own).

The contents of realigned array will be updated (cleared), if the value *NewSignPtr is not equal zero and will be kept in other case. When the array is remapped, the values of its shadow edges (see section 12) are not kept.

The array can be realigned by function realn_ only, if it was created by the function crtda_ with parameter *ReDistrParPtr equal to 2 or 3 (see section 6).

The distributed array, specified in the function call, can be not mapped earlier. In this case realn_ function is executed as align_ function, and *NewSignPtr parameter value is irrelevant. *ReDistrParPtr parameter value of the distributed array creation is also irrelevant.

The funcôion returns non-zero, if realigned array has a local part on the current processor, and zero in other case.

7.4Requesting map

ArrayMapRef arrmap_(

long
long

ArrayHeader[],
*StaticSignPtr );

ArrayHeader

header of the distributed array.

*StaticSignPtr

flag of static map creation.

The function arrmap_ creates an object (a map), describing current mapping of the distributed array onto the processor system representation, and returns a reference to the created object.

The map contains in particular the following information:

  • a reference to the abstract machine representation that distributed array is mapped on;

  • alligning rules for all dimensions of the representation;

  • the ranks of the distributed array and the abstract machine representation (for checking).

If flag of static map *StaticSignPtr is not equal to zero, then the map will not be deleted when control exits a program block (see section 8). Such map can be deleted only explicitly by function delarm_ considered in section 7.7.

7.5Specifying distributed array mapping according to map

long malign_(

long
AMViewRef
ArrayMapRef

ArrayHeader[],
*AMViewRefPtr,
*ArrayMapRefPtr );

ArrayHeader

header of the distributed array.

*AMViewRefPtr

reference to the abstract machine representation, being alignment pattern.

*ArrayMapRefPtr

reference to map of the distributed array.

The function malign_ performs distributed array mapping onto abstract machine representation according to map.

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

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

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