1
1

Add a high accuracy timer for MIPS.

This commit was SVN r19974.
Этот коммит содержится в:
George Bosilca 2008-11-11 14:57:39 +00:00
родитель 584154c2d3
Коммит aac4724c9d
3 изменённых файлов: 38 добавлений и 2 удалений

Просмотреть файл

@ -2,7 +2,7 @@
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# Copyright (c) 2004-2008 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -19,5 +19,6 @@
# This makefile.am does not stand on its own - it is included from opal/include/Makefile.am
headers += \
opal/sys/mips/atomic.h
opal/sys/mips/atomic.h \
opal/sys/mips/timer.h

33
opal/include/opal/sys/mips/timer.h Обычный файл
Просмотреть файл

@ -0,0 +1,33 @@
/*
* Copyright (c) 2008 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef OMPI_SYS_ARCH_TIMER_H
#define OMPI_SYS_ARCH_TIMER_H 1
#include <sys/times.h>
typedef uint64_t opal_timer_t;
static inline opal_timer_t
opal_sys_timer_get_cycles(void)
{
opal_timer_t ret;
struct tms accurate_clock;
times(&accurate_clock);
ret = accurate_clock.tms_utime + accurate_clock.tms_stime;
return ret;
}
#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 1
#endif /* ! OMPI_SYS_ARCH_TIMER_H */

Просмотреть файл

@ -95,6 +95,8 @@ extern "C" {
#include "opal/sys/sparcv9/timer.h"
#elif OMPI_ASSEMBLY_ARCH == OMPI_WINDOWS
#include "opal/sys/win32/timer.h"
#elif OMPI_ASSEMBLY_ARCH == OMPI_MIPS
#include "opal/sys/mips/timer.h"
#endif
#ifndef DOXYGEN