debugDDe (1158408), страница 9

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

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

If the trace-comparing mode is specified then these functions are used by trace reading module for reading trace file and forming trace structure in the memory.

void trc_put_beginstruct( char *File, unsigned long Line, long No, byte Type, byte Rank, long *Init, long *Last, long *Step )

File

the source file name of DVM-program

Line

the line number of DVM-program

No

unique structure number

Type

structure type (parallel or sequential loop, task region)

Rank

structure rank

Init

the array of initial values of iteration variables

Last

the array of end values of iteration variables;

Step

the array of iteration variables steps

The function puts the record of the structure beginning into the trace table.

void trc_put_endstruct(char *File, unsigned long Line, long No, unsigned long BegLine)

File

the source file name of DVM-program

Line

the line number of DVM-program

No

unique structure number

BegLine

line number of the structure beginning

The function puts the record of the structure finishing into the trace table.

void trc_put_iteration( AddrType *index )

index

array of pointers to iteration variables

The function puts the record of an iteration or task beginning into the trace table. If the mode of writing empty iterations is not specified then the record really will be put into the trace table only after beginning an inner structure or variable accessing inside this iteration.

void trc_put_iteration_flash_par( byte Rank, long *Index, long LI )

Rank

iteration rank.

Index

array of pointers to iteration variables

LI

absolute iteration index

The function unconditionally puts the record of the iteration or task beginning into the trace table.

void trc_put_iteration_flash(void)

The function put the current postponed record of the iteration beginning into the trace table. This function is called from functions trc_put_beginstruct() and trc_put_variable()

void trc_put_readvar( char *File, unsigned long Line, char *Operand, long Type, void *Value, byte Reduct )

File

the source file name of DVM-program

Line

the line number of DVM-program

Operand

variable name

Type

variable type

Value

variable address

Reduct

reduction variable flag. It is equal to 1 if a reduction variable is used

The function puts the record of the variable reading into the trace table.

void trc_put_prewritevar( char *File, unsigned long Line, char *Operand, long Type, byte Reduct )

File

the source file name of DVM-program

Line

the line number of DVM-program

Operand

variable name

Type

variable type

Reduct

reduction variable flag. It is equal to 1 if a reduction variable is used

The function puts the record of the beginning of an expression calculation into the trace table.

void trc_put_postwritevar( char *File, unsigned long Line, char *Operand, long Type, void *Value, byte Reduct )

File

the source file name of DVM-program

Line

the line number of DVM-program

Operand

variable name

Type

variable type

Value

variable address

Reduct

reduction variable flag. It is equal to 1 if a reduction variable is used

The function puts the record of the completion of an expression calculation into the trace table.

void trc_put_reductvar( char *File, unsigned long Line, long Type, void *Value )

File

the source file name of DVM-program

Line

the line number of DVM-program

Operand

variable name

Type

variable type

Value

variable address

The function puts the record of the completion a reduction calculation into the trace table.

void trc_put_variable( char *File, unsigned long Line, char *Operand, byte iType, long Type, void *Value, byte Reduct )

File

the source file name of DVM-program

Line

the line number of DVM-program

Operand

variable name

iType

trace record type

Type

variable type

Value

variable address

Reduct

reduction variable flag. It is equal to 1 if a reduction variable is used

The common function of putting the record of the variable accesses into the trace table.

void trc_put_skip( char *File, unsigned long Line )

File

the source file name of DVM-program

Line

the line number of DVM-program

The function puts the record of finishing self-calculation block in a sequential branch of the program.

6.5.4Trace reading module

The functions of trace reading module read trace records from the standard trace file and form corresponding records in the memory by using the trace accumulation functions (trc_put_*). This module also is used for reading trace configuration file.

The trace reading functions have the following prototypes:

void trc_rd_header( DVMFILE *hf, char* szFileName )

hf

opened file handle;

szFileName

file name that is used in the diagnostic messages.

The function reads trace configuration file. It forms the hierarchy of program structures in the memory. The function returns number of read lines.

void trc_rd_trace( DVMFILE *hf, char* szFileName, unsigned long StrBase )

hf

opened file handle;

szFileName

file name that is used in the diagnostic messages.

StrBase

the line number that was read from this file. This parameter is used for diagnostic messages

The function reads the standard trace file.

unsigned long trc_rd_gets( DVMFILE *hf )

hf

opened file handle;

The function reads a next record from a file. This function skips all empty strings and removes comments. The number of read lines is returned.

short trc_rd_search_key(char *str)

str

string with a keyword.

The function finds matched key code that corresponds to a keyword. It returns -1 if key code is not found for the specified string.

char* trc_rd_split( char *Str, char *Format, … )

Str

the parsed string;

Format

the string format;

variable addresses that accepts parameters.

The function parses string and gets parameters by specified format.

The following symbols can be used with the Format string:

  • & – a keyword. The parameter variable has short type.

  • % – an optional integer value. The parameter variable has long type.

  • ! – a required integer value. The parameter variable has long type.

  • #<type> – required value of the specified type, where the type can be one of the following symbols:

      • i – int

      • l – long

      • f – float

      • d – double

  • @ – any string.

6.5.5Trace comparing module

The trace comparing functions compares trace events with standard trace records.

The trace comparing functions have the following prototypes:

void trc_cmp_beginstruct( char *File, unsigned long Line, long No, byte Type, byte Rank, long *Init, long *Last, long *Step )

File

the source file name of DVM-program

Line

the line number of DVM-program

No

unique structure number

Type

structure type (parallel or sequential loop, task region)

Rank

structure rank

Init

the array of initial values of iteration variables

Last

the array of end values of iteration variables;

Step

the array of iteration variables steps

The function compares the trace record of a program structure beginning with the corresponding standard trace record.

void trc_cmp_endstruct(char *File, unsigned long Line, long No, unsigned long BegLine)

File

the source file name of DVM-program

Line

the line number of DVM-program

No

unique structure number

BegLine

line number of the structure beginning

The function compares the trace record of a program structure completion with the corresponding standard trace record.

void trc_cmp_iteration( AddrType *index )

index

array of pointers to iteration variables

The function compares the trace record of the iteration or task beginning with the corresponding standard trace record. If the mode of writing empty iterations is not selected then the record really will be compared only after beginning an inner structure or variable accessing inside this iteration.

void trc_cmp_iteration_flash(void)

The function compares the current postponed trace record of the iteration beginning with the corresponding standard trace record. This function is called from functions trc_cmp_beginstruct() and trc_cmp_variable ().

void trc_cmp_readvar(char *File, unsigned long Line, long Type, void *Value, byte Reduct)

File

the source file name of DVM-program

Line

the line number of DVM-program

Operand

variable name

Type

variable type

Value

variable address

Reduct

reduction variable flag. It is equal to 1 if a reduction variable is used

The function compares the trace record of a variable reading with the corresponding standard trace record.

void trc_cmp_prewritevar( char *File, unsigned long Line, long Type, byte Reduct )

File

the source file name of DVM-program

Line

the line number of DVM-program

Operand

variable name

Type

variable type

Reduct

reduction variable flag. It is equal to 1 if a reduction variable is used

The function compares the trace record of a beginning expression calculation with the corresponding standard trace record.

void trc_cmp_postwritevar( char *File, unsigned long Line, long Type, void *Value, byte Reduct )

File

the source file name of DVM-program

Line

the line number of DVM-program

Operand

variable name

Type

variable type

Value

variable address

Reduct

reduction variable flag. It is equal to 1 if a reduction variable is used

The function compares the trace record of a completion expression calculation with the corresponding standard trace record.

void trc_cmp_reductvar( char *File, unsigned long Line, long Type, void *Value )

File

the source file name of DVM-program

Line

the line number of DVM-program

Operand

variable name

Type

variable type

Value

variable address

The function compares the trace record of a reduction result with the corresponding standard trace record.

void trc_cmp_variable( char *File, unsigned long Line, enum_TraceType iType, long vType, void *Value, byte Reduct )

File

the source file name of DVM-program

Line

the line number of DVM-program

Operand

variable name

iType

trace record type

Type

variable type

Value

variable address

Reduct

reduction variable flag. It is equal to 1 if a reduction variable is used

The general function of the comparing variable usage trace record with the corresponding standard trace record.

void trc_cmp_skip( char *File, unsigned long Line )

File

the source file name of DVM-program

Line

the line number of DVM-program

The function compares the trace record of finishing self-calculation block in a sequential branch of the program with the standard trace record. The function may skip several trace records if it is needed.

long trc_cmp_forward(long CurTraceRecord, enum_TraceType iType)

CurTraceRecord

the number of the current trace record

iType

searched trace record type

The function searches a nearest trace record with the specified type from the current trace record. It returns the number of a found trace record or –1 if the specified type is absent or records with ‘structure beginning’, ‘iteration beginning’ or ‘structure completion’ types are presented between the current and found trace records.

6.5.6Reduction processing module

The reduction-processing module uses its own variable-table. This variable-table contains entries of the following type that describe a reduction variable:

typedef struct tag_REDUCT_INFO

{

char*

Current;

char*

Initial;

byte

StartReduct;

s_REDVAR*

RVar;

}

REDUCT_INFO;

Current

pointer to the buffer with a current calculated reduction result

Initial

pointer to the buffer with an initial value of the reduction variable

StartReduct

asynchronous reduction flag. It is equal to one if reduction calculation is started

RVar

pointer to an internal RTL-structure that describes the reduction variable

The method of manual reduction calculation is used for validation of the specified reduction operation. This method is based on partial reduction result calculation after each performed loop iteration. The function diter_() calculates partial reduction result by applying the specified reduction operation and restores initial value reduction variable after each performed iteration or parallel task. The dendl_() function calculates the final reduction result after completion the parallel structure.

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

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

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