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

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

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

The BLSIZEk value is determined as follows. Let:

AMSIZEk

the size of the k-th dimension of the abstract machine representation;

PSSIZEj

the size of the j-th dimension of the processor system.

Then:

BLSIZEk = {

min(DistrParamArray[j-1], AMSIZEk)

if DistrParamArray[j-1] ≠ 0;

(AMSIZEk-1) / PSSIZEj] + 1

if DistrParamArray[j-1] = 0.

Note, that the maximum value of Ik is

min( (PSSIZEj * BLSIZEk  1) , AMSIZEk  1 ).

Therefore, to use the mapping rule for the whole range of the k-th dimension of the abstract machine representation the following is required:

AMSIZEk  PSSIZEj * BLSIZEk ,

that is true, when

DistrParamArray[j-1]  AMSIZEk / PSSIZEj

or when

DistrParamArray[j-1] = 0.

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

Mj

range of values of the index variable of the processor system j-th imension.

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

  1. Fj(I1, ... ,In) = { Const } , where 0  Const  PSSIZEj-1 .

This mapping rule means that for each element (i1,…, in) of index space of the abstract machine representation the corresponding image-set contains one element Const belonging to the range of values of the index variable of the processor system j-th dimension.

As a result of mapping of specified representation of parental abstract machine on specified processor system, performed by distr_ function, every element of the representation (i.e. descendant abstract machine) will be matched with a processor system (a set of processors, which is an image of the representation element for F mapping function considered above). The abstract machine together with its processor image forms parallel subtask. The subtask is activated (started) when control enters corresponding parallel loop iteration. The subtask execution is parallel loop iteration execution (see section 9). Another way of parallel subtask creation and startup is considered in section 10.

Examples.

  1. Let the abstract machine and the processor systems be defined by matrices:

AM[9][8]

(0  I1  8 , 0  I2  7);

PS[3][4]

(0  J1  2 , 0  J2  3).

Then the function F( (I1,I2) ) = {[I1/3]} {[I2/2]} sets the following correspondence:

element PS[j1][j2]  sub-matrix AM[3*j1 I1 3*j1 + 2][2*j2 I2 2*j2 + 1] (block [3][2]).

  1. Let the abstract machine and the processor systems be defined as arrays:

AM[12]

(0  I  11);

PS[4][3]

(0  J1  3 , 0  J2  2).

Then the function F( (I) ) = {2} {[I/4]} sets the following correspondence:

element PS[2][j2]  vector AM[4*j2 I 4*j2 + 3] (block [4]).

The image of F does not include rows 0, 1 and 3 of the processor system.

  1. Let the abstract machine and the processor systems be defined as arrays:

AM[8][12]

(0  I1  7 , 0  I2  11);

PS[3]

(0  J  2).

Then the function F( (I1,I2) ) = {[I2/4]} sets the following correspondence:

element PS[j]  sub-matrix AM[0 I1 7][4*j I2 4*j + 3] (block [8][4]).

  1. Let the abstract machine and the processor systems be defined as arrays:

AM[12]

(0  I  11);

PS[4][3]

(0  J1  3 , 0  J2  2).

Then the function F( (I) ) = {*} {[I/4]} sets the following correspondence:

element PS[j1][j2]  vector AM[4*j2 I 4*j2 + 3] (block [4]).

That is, the image of F from the b) example is replicated along rows of the processor system.

  1. Let the abstract machine and the processor systems be defined as matrices:

AM[9][8]

(0  I1  8 , 0  I2  7);

PS[3][4]

(0  J1  2 , 0  J2  3).

Then the function F( (I1,I2) ) = {*} {*} sets the following correspondence:

element PS[j1][j2]  sub-matrix AM[0 I1 8][0 I2 7] (block [9][8]),

that is the whole space of the abstract machine representation.

Note. If an abstract machine representation from an example e) is given as template for the function align_ (realn_), then fully replicated distributed array (each element of an array is represented on each virtual processor, see section 7.1) can be obtained.

When the function distr_ is called, the coordinate mapping rule Fj(I1, ..., In) = { [Ik/BLSIZEk] } for j-th dimension of the processor system is defined as following:

AxisArray[j-1]

contains value k;

DistrParamArray[j-1]

contains value BLSIZEk.

If DistrParamArray[j-1] is equal to zero, then Run-Time System evaluates BLSIZEk as described above.

To specify rule Fj(I1, ... ,In), with image in set of all values of index variable of j-th dimension of processor system for any I1, ... ,In, value AxisArray[j-1] (value k) must be set to zero. The value DistrParamArray[j-1] is irrelevant in this case.

The mapping rule Fj(I1, ... ,In) = { Const } is defined as follows:

AxisArray[j-1]

= -1;

DistrParamArray[j-1]

contains value Const.

The function returns non-zero, if mapped representation has local part on current processor, and zero in other case.

5.2Remapping abstract machine representation onto processor system (resource redistribution)

long redis_ (

AMViewRef
PSRef
long
long
long
long

*AMViewRefPtr,
*PSRefPtr,
*ParamCountPtr,
AxisArray[],
DistrParamArray[],
*NewSignPtr );

*AMViewRefPtr

reference to the parental abstract machine representation, which mapping has to be redistributed.

*PSRefPtr

reference to the processor system, which defines resource structure of a new distribution.

*ParamCountPtr

the number of parameters, defined in arrays AxisArray and DistrParamArray.

AxisArray

array, which j-th element is a dimension number of the abstract machine representation used in the mapping rule for processor system (j+1)-th dimension.

DistrParamArray

array, which j-th element is a mapping rule parameter for parallel system (j+1)-th dimension (DistrParamArray[j] is a nonnegative integer).

*NewSignPtr

the flag that defines whether to save contents of realigned arrays or not.

The function redis_ cancels the resource distribuôion of the parental abstract machine previously defined for child abstract machines from *AMViewRefPtr representation by the function distr_ (or mdistr_ , see section 5.4). The function defines new distribution of this representation according to specified parameters. All the distributed arrays aligned with this representation by the function align_ and malign_ (whether directly or not), are remapped according to old alignment rules (see section 7). If the value *NewSignPtr is not equal zero, then the arrays will be updated (cleared), and will be kept in other case. When the arrays are remapped, the values of their shadow edges (see section 12) is not kept.

All elements of specified representation must be terminals of abstract machine hierarchy (must not have descendants).

All processors of the system, specified by *PSRefPtr reference, must belong to elementary intersection of the current processor system and the processor system, the parental processor system is mapped on. If *PSRefPtr = 0 or PSRefPtr = NULL, the current processor system will be used for resource distribution.

Remapped representation may be specified indirectly, if a header of distributed array, created by the function crtda_ with parameter *ReDistrParPtr equal to 1 or 3, is used as parameter *AMViewRefPtr (see section 6).

The abstract machine representation, passed in the function call, can be not mapped earlier. In this case redis_ function is executed as distr_ function, and *NewSignPtr parameter value is irrelevant.

The function returns non-zero, if remapped representation has a local part on the current processor, and zero in the other case.

5.3Requesting map

AMViewMapRef amvmap_ (

AMViewRef
long

AMViewRefPtr,
*StaticSignPtr );

*AMViewRefPtr

reference to the abstract machine representation.

*StaticSignPtr

flag of static map creation.

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

The map of the abstract machine representation contains in particular the following information:

  • the reference to the processor subsystem that the abstract machine representation is mapped onto;

  • mapping rules for all dimensions of the processor subsystem;

  • the ranks of abstract machine representation and the processor subsystem (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 the function delmvm_ considered in section 5.6.

5.4Specifying abstract machine representation mapping according to map

long mdistr_ (

AMViewRef
PSRef
AMViewMapRef

*AMViewRefPtr,
*PSRefPtr,
*AMViewMapRefPtr );

*AMViewRefPtr

reference to the abstract machine representation to be mapped.

*PSRefPtr

reference to the processor system, determining distributed resource structure.

*AMViewMapRefPtr

reference to the map of the abstract machine representation.

The function mdistr_ specifies mapping the abstract machine representation onto specified processor subsystem according to the map.

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

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

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