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

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

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

The following functions call functions of the accumulation or comparing modules according to the current trace mode:

void cmptrace_BeginSeqLoop( char *File, unsigned long Line, long No )

File

the source file name of DVM-program

Line

the line number of DVM-program

No

unique structure number

The function generates a trace event of the sequential loop beginning.

void cmptrace_BeginParLoop( char *File, unsigned long Line, long No, 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

Rank

loop 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 generates a trace event of the parallel loop beginning.

void cmptrace_BeginTaskRegion( char *File, unsigned long Line, long No )

File

the source file name of DVM-program

Line

the line number of DVM-program

No

unique structure number

The function generates a trace event of the task region beginning.

void cmptrace_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 generates a trace event of the finishing of a loop or task region.

void cmptrace_Iter( AddrType *index )

index

array of pointers to iteration variables

The function generates a trace event of the new iteration or parallel task beginning.

void cmptrace_PreStoreVar( 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 enervates a trace event of the beginning of an expression calculation.

void cmptrace_PostStoreVar( 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 generates a trace event of the finishing of an expression calculation and storing the expression result into a variable.

void cmptrace_LoadVar( 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 generates a trace event of the reading from a variable.

void cmptrace_ReductVar( char *File, unsigned long Line, long Type, void *Value, byte Wait )

File

the source file name of DVM-program

Line

the line number of DVM-program

Operand

variable name

Type

variable type

Value

variable address

Wait

wait reduction flag. It is equal to one if reduction result will be stored in the trace only after a current loop finishing

The function generates a trace event of the completion reduction calculation.

void cmptrace_SkipBlock( char *File, unsigned long Line )

File

the source file name of DVM-program

Line

the line number of DVM-program

The function generates a trace event of finishing the self-calculation block in the sequential program part.

The following functions are intended for work with descriptions of program structures.

STRUCT_INFO* trc_InfoNew(STRUCT_INFO* pParent)

pParent

pointer to the description of enclosing program structure

The function allocates and initializes a new structure description. The function returns a pointer to the new structure.

void trc_InfoDone(STRUCT_INFO* pInfo)

pInfo

pointer to the description of program structure

Destructor of the description of program structure.

int trc_InfoCanTrace(STRUCT_INFO* pInfo, int nRecType)

pInfo

pointer to the description of current executed program structure

nRecType

type of the trace event

The function checks the structure trace level and entrance of the current structure iteration in a range of traced iterations. It returns non zero value if the specified trace event can be traced..

void trc_InfoSetup(STRUCT_INFO* pInfo, long *Init, long *Last, long *Step)

pInfo

pointer to the description of program structure

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 prepares the structure description for beginning the structure execution.

STRUCT_INFO* trc_InfoFindForCurrentLevel(long No, byte Type, byte Rank, char *File, unsigned long Line)

No

unique structure number

Type

structure type (parallel or sequential loop, task region);

Rank

structure rank

File

the source file name of DVM-program

Line

the line number of DVM-program

The function searches a structure description in the current level by the specified parameters.

STRUCT_INFO* trc_InfoFindByNo(long No, s_COLLECTION *pColl)

No

unique structure number

pColl

collection of descriptions of program structures

The function recursively searches a structure description by the structure number.

6.5.2Trace writing module

The functions of trace writing module are intended for forming trace file and trace configuration file. The functions have the following prototypes:

void trc_wrt_header( s_COLLECTION* pStructs, int Level, FILE *hf, int nWriteInfo )

pStructs

a set of structure descriptions of the top level

Level

current processed level. This parameter is used for the recursive calls

hf

opened file handle

nWriteInfo

it is equal to 1, if an additional trace information should be written in to the loop description file

The function forms the trace configuration file. It recursively calls itself with Level+1 and set of inner structures of each structure from the pStructs.

void trc_wrt_trace( FILE *hf )

hf

open file handle

The function forms standard trace file.

size_t trc_wrt_beginstruct( FILE *hf, STRUCT_BEGIN *pStruct)

hf

open file handle

pStruct

pointer to the trace record of the structure beginning.

The function writes the record of structure beginning into the standard trace file. It returns the size of the written record in bytes.

size_t trc_wrt_enstruct( FILE *hf, STRUCT_END* pStruct)

hf

open file handle

pStruct

pointer to the trace record of the structure finishing.

The function writes the record of structure finishing into the standard trace file. It returns the size of the written record in bytes.

size_t trc_wrt_iter( FILE *hf, ITERATION *Iter )

hf

open file handle

Iter

pointer to the trace record of the iteration or task beginning.

The function writes the record of iteration or task beginning into the standard trace file. It returns the size of the written record in bytes.

size_t trc_wrt_readvar( FILE *hf, VARIABLE *Var )

hf

open file handle

Var

pointer to the trace record of the variable usage

The function writes the record of variable reading into the standard trace file. It returns the size of the written record in bytes.

size_t trc_wrt_prewritevar( FILE *hf, VARIABLE *Var )

hf

open file handle

Var

pointer to the trace record of the variable usage

The function writes the record of beginning expression calculation into the standard trace file and returns the size of the written record in bytes.

size_t trc_wrt_postwritevar( FILE *hf, VARIABLE *Var )

hf

open file handle

Var

pointer to the trace record of the variable usage

The function writes the record of finishing expression calculation into the standard trace file and returns the size of the written record in bytes.

size_t trc_wrt_reductvar( FILE *hf, VARIABLE *Var )

hf

open file handle

Var

pointer to the trace record of the variable usage

The function writes the record of completion reduction calculation into the standard trace file. The size of the written record in bytes is returned.

size_t trc_wrt_variable( FILE *hf, VARIABLE *Var, int iType )

hf

open file handle

Var

pointer to the trace record of the variable usage

iType

trace record type

The common function of writing a variable usage record into the standard trace file. The size of the written record in bytes is returned.

size_t trc_wrt_skip( FILE *hf, SKIP *Skip )

hf

open file handle

Skip

pointer to the record of finishing self-calculation block

The function writes the record of finishing self-calculation block in a sequential branch of the program. The size of the written record in bytes is returned.

void trc_wrt_calctraceinfo(void)

The function calculates the trace size for the each program structure and common trace size.

void trc_wrt_calcinfo(STRUCT_INFO* pInfo)

pInfo

pointer to the description of program structure

The function calculates the trace size for the specified structure.

6.5.3Trace accumulation module

Trace accumulation functions form trace records in the global trace table. If the cross-passage mode of writing is specified then these functions do not form trace records in the memory and write them in to the standard trace file using trace writing module (trc_wrt_() functions).

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

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

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