本文整理汇总了C++中rundebug函数的典型用法代码示例。如果您正苦于以下问题:C++ rundebug函数的具体用法?C++ rundebug怎么用?C++ rundebug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rundebug函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
int main(void)
{
int number_failed = 0;
SRunner *sr = NULL;
rundebug();
sr = srunner_create(req_deletearray_suite());
srunner_set_log(sr, "req_deletearray_suite.log");
srunner_run_all(sr, CK_NORMAL);
number_failed = srunner_ntests_failed(sr);
srunner_free(sr);
return number_failed;
}
开发者ID:AlbertDeFusco,项目名称:torque,代码行数:12,代码来源:test_req_deletearray.c
示例2: main
int main(void)
{
int number_failed = 0;
SRunner *sr = NULL;
rundebug();
sr = srunner_create(user_info_suite());
srunner_set_log(sr, "user_info_suite.log");
srunner_run_all(sr, CK_NORMAL);
number_failed = srunner_ntests_failed(sr);
srunner_free(sr);
return(number_failed);
}
开发者ID:markmont,项目名称:torque,代码行数:12,代码来源:test_user_info.c
示例3: main
int main(void)
{
int number_failed = 0;
SRunner *sr = NULL;
rundebug();
sr = srunner_create(mom_process_request_suite());
srunner_set_log(sr, "mom_process_request_suite.log");
srunner_run_all(sr, CK_NORMAL);
number_failed = srunner_ntests_failed(sr);
srunner_free(sr);
return number_failed;
}
开发者ID:adaptivecomputing,项目名称:torque,代码行数:12,代码来源:test_uut.c
示例4: main
int main(void)
{
int number_failed = 0;
SRunner *sr = NULL;
server.sv_attr_mutex = (pthread_mutex_t *)calloc(1, sizeof(pthread_mutex_t));
rundebug();
sr = srunner_create(req_quejob_suite());
srunner_set_log(sr, "req_quejob_suite.log");
srunner_run_all(sr, CK_NORMAL);
number_failed = srunner_ntests_failed(sr);
srunner_free(sr);
return number_failed;
}
开发者ID:craigprescott,项目名称:torque,代码行数:13,代码来源:test_req_quejob.c
示例5: main
int main(void)
{
int number_failed = 0;
SRunner *sr = NULL;
init_server();
rundebug();
sr = srunner_create(svr_mail_suite());
srunner_set_log(sr, "svr_mail_suite.log");
srunner_run_all(sr, CK_NORMAL);
number_failed = srunner_ntests_failed(sr);
srunner_free(sr);
return number_failed;
}
开发者ID:j0hnf,项目名称:torque,代码行数:13,代码来源:test_svr_mail.c
示例6: main
int main(void)
{
int number_failed = 0;
SRunner *sr = NULL;
exiting_jobs_info = (hash_map *)calloc(1, sizeof(hash_map));
exiting_jobs_info->hm_mutex = (pthread_mutex_t *)calloc(1, sizeof(pthread_mutex_t));
rundebug();
sr = srunner_create(exiting_jobs_suite());
srunner_set_log(sr, "exiting_jobs_suite.log");
srunner_run_all(sr, CK_NORMAL);
number_failed = srunner_ntests_failed(sr);
srunner_free(sr);
return(number_failed);
}
开发者ID:braddaw,项目名称:torque-1,代码行数:14,代码来源:test_exiting_jobs.c
示例7: main
int main(void)
{
int number_failed = 0;
svr_do_schedule_mutex = (pthread_mutex_t *)calloc(1, sizeof(pthread_mutex_t));
listener_command_mutex = (pthread_mutex_t *)calloc(1, sizeof(pthread_mutex_t));
pthread_mutex_init(svr_do_schedule_mutex, NULL);
pthread_mutex_init(listener_command_mutex, NULL);
SRunner *sr = NULL;
init_server();
rundebug();
sr = srunner_create(req_jobobit_suite());
srunner_set_log(sr, "req_jobobit_suite.log");
srunner_run_all(sr, CK_NORMAL);
number_failed = srunner_ntests_failed(sr);
srunner_free(sr);
return number_failed;
}
开发者ID:dooodlesomething,项目名称:torque,代码行数:17,代码来源:test_uut.c
示例8: main
int main(void)
{
int number_failed = 0;
SRunner *sr = NULL;
#ifdef NUMA_SUPPORT
node_boards[0].mic_start_index = 0;
node_boards[1].mic_start_index = 2;
node_boards[2].mic_start_index = 4;
#endif
rundebug();
sr = srunner_create(start_exec_suite());
srunner_set_log(sr, "start_exec_suite.log");
srunner_run_all(sr, CK_NORMAL);
number_failed = srunner_ntests_failed(sr);
srunner_free(sr);
return number_failed;
}
开发者ID:brianrtc,项目名称:torque,代码行数:19,代码来源:test_uut.c
示例9: run_file
void run_file(int name_len, char const *name, int probe_name_len, char const *probename, bool start, double sina, double cosa, int audio) {
rundebug("run file %d %f %f", start, sina, cosa);
abort_run_file();
if (name_len == 0)
return;
strncpy(run_file_name, name, name_len);
run_file_name[name_len] = '\0';
strncpy(probe_file_name, probename, probe_name_len);
probe_file_name[probe_name_len] = '\0';
settings.run_time = 0;
settings.run_dist = 0;
settings.run_file_current = 0;
int probe_fd;
if (probe_name_len > 0) {
probe_fd = open(probe_file_name, O_RDONLY);
if (probe_fd < 0) {
debug("Failed to open probe file '%s': %s", probe_file_name, strerror(errno));
return;
}
struct stat stat;
if (fstat(probe_fd, &stat) < 0) {
debug("Failed to stat probe file '%s': %s", probe_file_name, strerror(errno));
close(probe_fd);
return;
}
probe_file_size = stat.st_size;
if (probe_file_size < sizeof(ProbeFile)) {
debug("Probe file too short");
close(probe_fd);
return;
}
}
int fd = open(run_file_name, O_RDONLY);
if (fd < 0) {
debug("Failed to open run file '%s': %s", run_file_name, strerror(errno));
if (probe_name_len > 0)
close(probe_fd);
return;
}
struct stat stat;
if (fstat(fd, &stat) < 0) {
debug("Failed to stat run file '%s': %s", run_file_name, strerror(errno));
close(fd);
if (probe_name_len > 0)
close(probe_fd);
return;
}
run_file_size = stat.st_size;
run_file_map = reinterpret_cast<Run_Record *>(mmap(NULL, run_file_size, PROT_READ, MAP_SHARED, fd, 0));
close(fd);
if (probe_name_len > 0) {
probe_file_map = reinterpret_cast<ProbeFile *>(mmap(NULL, probe_file_size, PROT_READ, MAP_SHARED, probe_fd, 0));
close(probe_fd);
if (((probe_file_map->nx + 1) * (probe_file_map->ny + 1)) * sizeof(double) + sizeof(ProbeFile) != probe_file_size) {
debug("Invalid probe file size %ld != %ld", probe_file_size, ((probe_file_map->nx + 1) * (probe_file_map->ny + 1)) * sizeof(double) + sizeof(ProbeFile));
munmap(probe_file_map, probe_file_size);
munmap(run_file_map, run_file_size);
probe_file_map = NULL;
run_file_map = NULL;
return;
}
}
else
probe_file_map = NULL;
if (audio < 0) {
// File format:
// records
// strings
// int32_t stringlengths[]
// int32_t numstrings
// double bbox[8]
run_file_num_strings = read_num(run_file_size - sizeof(double) * 8 - sizeof(int32_t));
strings = reinterpret_cast<String *>(malloc(run_file_num_strings * sizeof(String)));
off_t pos = run_file_size - sizeof(double) * 8 - sizeof(int32_t) - sizeof(int32_t) * run_file_num_strings;
off_t current = 0;
for (int i = 0; i < run_file_num_strings; ++i) {
strings[i].start = current;
strings[i].len = read_num(pos + sizeof(int32_t) * i);
current += strings[i].len;
}
run_file_first_string = pos - current;
run_file_num_records = run_file_first_string / sizeof(Run_Record);
}
else {
audio_hwtime_step = 1000000. / *reinterpret_cast <double *>(run_file_map);
run_file_num_records = run_file_size - sizeof(double);
}
run_file_wait_temp = 0;
run_file_wait = start ? 0 : 1;
run_file_timer.it_interval.tv_sec = 0;
run_file_timer.it_interval.tv_nsec = 0;
run_file_refx = targetx;
run_file_refy = targety;
probe_adjust = 0;
//debug("run target %f %f", targetx, targety);
run_file_sina = sina;
run_file_cosa = cosa;
run_file_audio = audio;
run_preline.X = NAN;
run_preline.Y = NAN;
//.........这里部分代码省略.........
开发者ID:ddparker,项目名称:franklin,代码行数:101,代码来源:run.cpp
示例10: run_file_fill_queue
void run_file_fill_queue() {
static bool lock = false;
if (lock)
return;
lock = true;
rundebug("run queue, wait = %d tempwait = %d q = %d %d %d finish = %d", run_file_wait, run_file_wait_temp, settings.queue_end, settings.queue_start, settings.queue_full, run_file_finishing);
if (run_file_audio >= 0) {
while (true) {
if (!run_file_map || run_file_wait || run_file_finishing)
break;
if (settings.run_file_current >= run_file_num_records) {
run_file_finishing = true;
//debug("done running audio");
break;
}
int16_t next = (current_fragment + 1) % FRAGMENTS_PER_BUFFER;
if (next == running_fragment)
break;
settings.run_file_current = arch_send_audio(&reinterpret_cast <uint8_t *>(run_file_map)[sizeof(double)], settings.run_file_current, run_file_num_records, run_file_audio);
current_fragment = next;
store_settings();
if ((current_fragment - running_fragment + FRAGMENTS_PER_BUFFER) % FRAGMENTS_PER_BUFFER >= MIN_BUFFER_FILL && !stopping)
arch_start_move(0);
}
lock = false;
return;
}
while (run_file_map // There is a file to run.
&& (settings.queue_end - settings.queue_start + QUEUE_LENGTH) % QUEUE_LENGTH < 4 // There is space in the queue.
&& !settings.queue_full // Really, there is space in the queue.
&& settings.run_file_current < run_file_num_records // There are records to send.
&& !run_file_wait_temp // We are not waiting for a temp alarm.
&& !run_file_wait // We are not waiting for something else (pause or confirm).
&& !run_file_finishing) { // We are not waiting for underflow (should be impossible anyway, if there are commands in the queue).
int t = run_file_map[settings.run_file_current].type;
if (t != RUN_LINE && t != RUN_PRE_LINE && t != RUN_PRE_ARC && t != RUN_ARC && (arch_running() || settings.queue_end != settings.queue_start || computing_move))
break;
Run_Record &r = run_file_map[settings.run_file_current];
rundebug("running %d: %d %d", settings.run_file_current, r.type, r.tool);
switch (r.type) {
case RUN_SYSTEM:
{
char const *cmd = strndupa(&reinterpret_cast<char const *>(run_file_map)[run_file_first_string + strings[r.tool].start], strings[r.tool].len);
debug("Running system command: %ld %d %s", strings[r.tool].start, strings[r.tool].len, cmd);
int ret = system(cmd);
debug("Done running system command, return = %d", ret);
break;
}
case RUN_PRE_ARC:
{
double x = r.X * run_file_cosa - r.Y * run_file_sina + run_file_refx;
double y = r.Y * run_file_cosa + r.X * run_file_sina + run_file_refy;
double z = r.Z;
//debug("line %f %f %f", x, y, z);
queue[settings.queue_end].center[0] = x;
queue[settings.queue_end].center[1] = y;
queue[settings.queue_end].center[2] = handle_probe(x, y, z);
queue[settings.queue_end].normal[0] = r.E;
queue[settings.queue_end].normal[1] = r.f;
queue[settings.queue_end].normal[2] = r.F;
break;
}
case RUN_PRE_LINE:
{
run_preline.X = r.X;
run_preline.Y = r.Y;
run_preline.Z = r.Z;
run_preline.E = r.E;
run_preline.tool = r.tool;
break;
}
case RUN_LINE:
case RUN_ARC:
{
queue[settings.queue_end].single = false;
queue[settings.queue_end].probe = false;
queue[settings.queue_end].arc = r.type == RUN_ARC;
queue[settings.queue_end].f[0] = r.f;
queue[settings.queue_end].f[1] = r.F;
double x = r.X * run_file_cosa - r.Y * run_file_sina + run_file_refx;
double y = r.Y * run_file_cosa + r.X * run_file_sina + run_file_refy;
double z = r.Z;
//debug("line/arc %f %f %f", x, y, z);
int num0 = spaces[0].num_axes;
if (num0 > 0) {
queue[settings.queue_end].data[0] = x;
if (num0 > 1) {
queue[settings.queue_end].data[1] = y;
if (num0 > 2) {
queue[settings.queue_end].data[2] = handle_probe(x, y, z);
if (num0 > 3) {
queue[settings.queue_end].data[3] = run_preline.X;
if (num0 > 4) {
queue[settings.queue_end].data[4] = run_preline.Y;
if (num0 > 5) {
queue[settings.queue_end].data[5] = run_preline.Z;
}
}
run_preline.X = NAN;
run_preline.Y = NAN;
//.........这里部分代码省略.........
开发者ID:ddparker,项目名称:franklin,代码行数:101,代码来源:run.cpp
注:本文中的rundebug函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论