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

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

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

The array AxisArray can't contain two same parallel loop dimension numbers.

The sizes of AxisArray, CoeffArray and ConstArray arrays must be equal to remote distributed array rank.

Correct sampling rules must not violate remote distributed array boundaries.

The base pointer BasePtr must refer to any variable of the same type as the type of the remote distributed array elements. The variable value is irrelevant, because the base pointer is used only for access to remote elements of the distributed array, allocated in the created buffer.

Dealing with the header of remote elements buffer and base pointer is considered in detail in section Error: Reference source not found.

If the flag *StaticSignPtr of static buffer is not equal to zero, then the created buffer will be not deleted automatically, when the control exits the program block (see section Error: Reference source not found). Such buffer can be deleted only explicitly using the function delrb_ considered below.

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

Note 1. If all sampling rules are constant ones, created buffer rank must be zero by virtue of writing above. In this case Run-Time System creates one-dimensional distributed array-buffer, containing single element.

Note 2. Let when parallel loop is mapped by mappl_ function for some dimension initial value of index variable is more than its last value for positive step or its last value of index variable is more than its initial value for negative step (empty loop). Then these loop usage as crtrbl_ function parameter will be resulted in creation of dummy remote element buffer. 0-th word of the buffer header (distributed array reference) will be assigned by null value. Dummy remote element buffer can be used in all remote access functions, but it is not allowed to use the buffer header as parameter of the functions, dealing with distributed arrays. An access to local part of distributed array by dummy buffer header is not allowed also.

The buffer of remote elements, required for parallel loop and for program branches, that are not the loop iterations, can be also created by crtrba_ and crtrbp_ functions considered below.

long crtrba_ (

long
long

void
long
long

long

long

long

RemArrayHeader[],
BufferHeader[],

*BasePtr,
*StaticSignPtr,

LocArrayHeader[],

AxisArray[],
CoeffArray[],
ConstArray[] );

RemArrayHeader

header of the remote distributed array.

BufferHeader

header of a remote element buffer to be created.

BasePtr

base pointer for access to the remote element buffer.

*StaticSignPtr

flag of static buffer creation.

LocArrayHeader

distributed (local) array header, whose processing requires remote array elements, located in the buffer.

AxisArray

array, which i-th element contains the dimension number of local distributed array, corresponding to (i+1)-th dimension of the remote array (k(i+1), see below).

CoeffArray

array, which i-th element is coefficient of index variable of the linear sampling rule for (i+1)-th dimension of the remote array (Ai+1, see below).

ConstArray

array, which i-th element is constant of index variable of the linear sampling rule for (i+1)-th dimension of the remote array (Bi+1, see below).

The function crtrba_ creates the buffer to locate remote elements of distributed array with RemArrayHeader header, which are required to deal with distributed (local) array, specified by LocArrayHeader. Remote and local distributed arrays must be mapped on the processor systems (perhaps, each one in its own), all elements of which belong to the current processor system.

Required elements of remote distributed array are specified for each its not-free dimension by linear sampling rules as:

Ai*Vk(i) + Bi , where:

i

a number of the remote distributed array dimension;

Vk(i)

index variable of k-th dimension of local distributed array, varied in the range of its initial and last value;

Ai

integer constant;

Bi

non-negative integer.

The remote element buffer, created by crtrba_ function is mapped just as the local distributed array, but its i-th dimension is matched with k(i)-th dimension of the local array (in the case, when linear sampling rule with non-zero Ai is specified for i-th dimension of the remote array).

All parameters of crtrba_ function (except LocArrayHeader) are similar to same named parameters of crtrbl_ function, considered above.

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

long crtrbp_ (

long
long

void
long
PSRef

long

RemArrayHeader[],
BufferHeader[],

*BasePtr,
*StaticSignPtr,

*PSRefPtr,

CoordArray[] );

RemArrayHeader

header of the remote distributed array.

BufferHeader

header of a remote element buffer to be created.

BasePtr

base pointer for access to the remote element buffer.

*StaticSignPtr

flag of static buffer creation.

*PSRefPtr

reference to processor system, each processor of which requires presence of remote distributed array elements;

CoordArray

array, which i-th element is coordinate value of required element for (i+1)-th dimension of the remote array.

The function crtrbp_ creates the buffer to locate remote elements of distributed array with RemArrayHeader header, which must be present on each processor of the system, specified by *PSRefPtr reference.

Remote distributed array must be mapped on the processor system, all elements of which must belong to the current processor system. *PSRefPtr reference defines the current processor system or its direct or indirect subsystem. NULL value of PSRefPtr pointer or zero value of *PSRefPtr reference specify the current processor system.

Required elements of remote distributed array for (i+1)-th dimension are defined by i-th word of CoordArray array: non-negative value defines remote array element coordinate, negative one specifies whole dimension of the remote array (analogue of free dimension of the remote array in crtrbl_ and crtrba_ function description). A number of elements in CoordArray array must be equal to remote distributed array rank.

The rank of remote element buffer, created by crtrbp_ function, is equal to a number of negative elements of CoordArray array. The size of j-th buffer dimension is equal to j-th negative element of CoordArray array. If all elements of CoordArray array are non-negative (exactly one remote element is specified), Run-Time System creates one-dimensional distributed array-buffer, consisting of single element.

While executing crtrbp_ function, remote element buffer is mapped so that all required, and therefore, located in the buffer remote elements assist on all processors of the system, specified by PSRefPtr parameter. To do this, Run-Time System creates subsidiary one-dimensional representation of the current abstract machine, consisting of single element and maps it with replication on all dimensions on specified in the function call processor system. Remote element buffer is mapped on subsidiary representation with replication on its single dimension.

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

14.2Initializing loading remote element buffer of distributed array

long loadrb_ (

long

long

BufferHeader[],

*RenewSignPtr );

BufferHeader

header of the remote element buffer.

*RenewSignPtr

flag to reload already loaded buffer.

The function loadrb_ initializes specified buffer loading by the distributed array elements, for which the buffer was created by crtrbl_, crtrba_ or crtrbp_ function.

The function can be used for already loaded buffer. In this case actual reloading is performed if *RenewSignPtr is not equal to zero, and isn't performed otherwise. The buffer reloading is not allowed (independently on *RenewSignPtr parameter value), if previous loading (actual or dummy) was not completed by waitrb_ function (see section 14.3).

As loaded buffer as its remote distributed array must be mapped on the processor systems, which each element must belong to the current processor system.

The buffer loading can't be started by loadrb_ function, if it was included in any buffer group (see sections 14.6-14.10).

The function returns zero.

14.3Waiting for completion of loading remote element buffer of distributed array

long waitrb_ (long BufferHeader[]);

BufferHeader  header of the remote element buffer.

Loading the buffer specified in the function call must be initialized by the current subtask. Waiting for completion of not initialized earlier buffer loading is not allowed.

The function returns zero.

14.4Deleting remote element buffer of distributed array

long delrb_ (long BufferHeader[]);

BufferHeader  header of the remote element buffer to be deleted.

The remote element buffer can be deleted by delrb_ 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).

To delete remote element buffer the function delobj_ can also be used (see section 17.5).

The buffer, which loading is not completed by waitrb_ function, can't be deleted.

If deleted buffer was included in any buffer group, it is excluded from the group (see sections 14.6-14.10). In this case the buffer group must not be in loading state.

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

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

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