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

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

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

The base pointer BasePtr has to point to any variable of the same type as that of distributed array element. The value of this variable is not essential because the base pointer is only used to access to the elements from the local part of the distributed array.

The structure and usage of distributed array header (jointly with base pointer) to access to the array local part are considered in section 13.4.

If the flag *StaticSignPtr of the static array creation is not equal to zero, then the created distributed array is not deleted automatically when the control exits from the current program block (see section 8). Such array has to be deleted explicitly using the function delda_.

The parameter *ReDistrParPtr may have the following values:

0

the array can not be an argument of the function redis_ and can not be redistributed by the function realn_;

1

the array can be an argument of the function redis_, but can not be redistributed by the function realn_;

2

the array can be redistributed by the function realn_, but this array can not be used in defining the abstract machine representation using the function redis_;

3

the array can be used as a reference to the abstract machine representation in the function redis_, and the array can be redistributed by the function realn_.

The number of the parameters defined in the arrays LowShdWidthArray and HiShdWidthArray (that is the width of low and high shadow edges) has to be equal to the created array rank. See section 12 for more detail description of the shadow edges of the distributed array local parts. Note, that the shadow edge width can be equal to zero.

The function returns zero.

6.2Deleting distributed array

long delda_(long ArrayHeader[]);

ArrayHeader – the header of the array to be deleted.

The function deletes the distributed array created by the function crtda_. After array deleting the user program can use distributed array header for any goal.

The distributed array can be deleted by delda_ function only if it was created in the current subtask and in the current program block (or its sub-block) (see sections 8 and 10). All edge groups, in which the array was included, (see section 12) will be deleted also.

A distributed array can be deleted also by the function delobj_ (see section 17.5).

The function returns zero.

6.3Creating additional header of distributed array

long addhdr_ (

long
long

NewArrayHeader[],
ArrayHeader[] );

NewArrayHeader

header to be created.

ArrayHeader

one of the existing headers.

The function creates the distributed array header, which further will be used equitably with existing headers. In particular it can be used to create other additional headers.

When the distributed array is aligned by functions align_ and malign_ (see section 7) all its headers are initialized. The array realigning by the functions realn_, mrealn_, redis_ and mredis_ (see sections 5 and 7) also causes all its headers updating.

The function returns zero.

6.4Deleting distributed array header

long delhdr_ (long ArrayHeader[]);

ArrayHeader  header to be deleted.

The function deletes the header, created by addhdr_ function or specified in crtda_ funcôion call. The only header of distributed array can't be deleted.

The function returns zero.

7Mapping distributed array

7.1Aligning distributed array

long align_ (

long
PatternRef
long
long
long

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

ArrayHeader

the header of the distributed array to be aligned.

*PatternRefPtr

reference to the alignment pattern.

AxisArray

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

CoeffArray

array, which j-th element is a coefficient for distributed array index variable used in the 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.

The function align_ defines the location of the specified distributed array in the assigned abstract machine representation space (in other words the function aligns the distributed array). Besides, the elements of the array are distributed among the child abstract machines incorporating in the representation. The abstract machine representation is defined by means of the pattern, which can be as the representation itself, or a distributed array (this is called "indirect mapping"). In the last case the reference to the pattern is a first word of distributed array header.

Using the distributed array as a pattern is allowed only if this array has already been mapped on an abstract machine representation. Moreover, using an abstract machine representation as a pattern is allowed only if this representation has been mapped on a processor system. So the function align_ only distributes elements of the aligned distributed array among processors from this processor system.

Aligning pattern can be mapped (as final result) on the current processor system or its subsystem only.

It is not allowed to map already mapped distributed array.

Consider distributed array alignment in detail. Let F be a multifunctional with the domain of definition in a space of indexes of the aligned array and with the image in the space of indexes of the pattern:

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

F1(I1, ... ,Ii, ... ,In)
. . . . . . . . . . . . .. .
F
j(I1, ... ,Ii, ... ,In)
. . . . . . . . . . . . .. .
F
m(I1, ... ,Ii, ... ,In)

where:

is a symbol of the Cartesian product;

n

rank of the distributed array;

m

rank of the pattern;

Ii

index variable of the i-th dimension of the aligned array;

Fj

multifunction, which range of value is a range of index variable of pattern j-th dimension.

An alignment of the distributed array with the pattern is a defining the F multifunction. This defining designates that an element (I1, ... ,In) of an aligned array has to be located on the processor if and only if some pattern elements from F((I1, ... ,In)) set are mapped on this processor. The set F((I1, ... ,In)) is an image-set, and components of this set are vectors of space of indexes of the pattern.

The F1, ... , Fm functions are named "coordinate alignment rules". Run-Time System provides the following set of alignment rules.

  1. Fj(I1, ... ,In) = {Aj*Ik + Bj} , where:

k=f(j)

dimension number of an aligned array (1 k n, f(j1)f(j2) when j1 j2);

Aj

integer;

Bj

nonnegative integer.

This alignment rule means that for each element (I1,…, In) of index space of the aligned array the corresponding image-set contains one element – Aj*Ik + Bj. This element belongs to the value range of the index variable of the pattern j-th dimension.

Note, that Aj and Bj have to meet the following requirements:

0  Bj  MAXj; and 0  Aj*MAXk + Bj  MAXj , where:

MAXj

maximum of the index variable of the j-th dimension;

MAXk

maximum of the index variable of the aligned array k-th dimension.

  1. Fj(I1, ... ,In) = {q  Mj: 0  q  MAXj} , where:

Mj

range of values of the index value of the pattern j-th dimension;

MAXj

maximum of the index variable of the pattern j-th.

This mapping rule means that for each element (I1,…, In) of index space of the aligned array a corresponding image-set, consists of whole range of values of index variable of the pattern j-th dimension. In such a case, the symbol "*" ("any of the admissible") is usually used.

Examples.

  1. Alignment rule F( (I1,I2) ) = {I1} {I2} means that element of two-dimensional array has to be mapped onto any processor, an element of two-dimensional pattern is mapped on, if the indexes of both elements are equal.

  2. Alignment rule F( (I1,I2) ) = {*} {I1+5} {*} means that the element of two-dimensional array has to be mapped onto any processor, an element of three-dimensional pattern is mapped on, if the index of the pattern second dimension is equal to the index of the aligned array first dimension plus 5. The index of the aligned array second dimension and the indexes of the pattern first and third dimension are not considered.

  3. Alignment rule F( (I1,I2,I3) ) = {*} {*} means, that each element of three-dimensional array has to be mapped onto each processor, any element of two-dimension pattern is mapped on. The indexes of the aligned array and of the pattern are not considered.

  4. Alignment rule F( (I1,I2) ) = {0} {1} {2} means, that an element of two-dimensional array has to be mapped onto each processor, the element (0,1,2) of three-dimensional pattern is mapped on. The indexes of aligned array are not considered.

Defining the aligned array distribution among pattern space (that is the defining F1, ... ,Fm functions) it is necessary to take into account that all elements of the distributed array have to be inside the pattern space. Observance of correct mapping on each stage of a chain of alignments guarantees the correct final distribution of array elements among the processors.

Note that if an array is used as a pattern, then after realignment of this array by the function realn_ (see section 7.3), the array aligned with this pattern keeps its location.

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

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

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