Skip to content

Commit

Permalink
Merge pull request #71 from shintaro-iwasaki/relative_include_path
Browse files Browse the repository at this point in the history
Use relative paths to include Qthreads headers in public headers
  • Loading branch information
olivier-snl authored Sep 16, 2020
2 parents 1abc01a + 26df00c commit 54c6912
Show file tree
Hide file tree
Showing 25 changed files with 36 additions and 34 deletions.
2 changes: 1 addition & 1 deletion include/qthread/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (c) 2008 Sandia Corporation
#

include_HEADERS = qthread.h
include_HEADERS = top/qthread.h
pkginclude_HEADERS = \
allpairs.h \
barrier.h \
Expand Down
4 changes: 2 additions & 2 deletions include/qthread/allpairs.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef QTHREAD_ALLPAIRS_H
#define QTHREAD_ALLPAIRS_H

#include <qthread/macros.h>
#include <qthread/qarray.h>
#include "macros.h"
#include "qarray.h"

Q_STARTCXX /* */
typedef void (*dist_f)(const void *unit1, const void *unit2);
Expand Down
4 changes: 2 additions & 2 deletions include/qthread/barrier.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef QTHREAD_LOG_BARRIER_H
#define QTHREAD_LOG_BARRIER_H

#include <qthread/macros.h>
#include <qthread/qthread.h>
#include "macros.h"
#include "qthread.h"

Q_STARTCXX
/************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion include/qthread/cacheline.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef QTHREAD_CACHELINE_H
#define QTHREAD_CACHELINE_H

#include <qthread/macros.h>
#include "macros.h"

Q_STARTCXX /* */
int qthread_cacheline(void);
Expand Down
2 changes: 1 addition & 1 deletion include/qthread/dictionary.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <inttypes.h>
#include <stdlib.h>

#include <qthread/macros.h>
#include "macros.h"

Q_STARTCXX /* */

Expand Down
6 changes: 3 additions & 3 deletions include/qthread/hash.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef QTHREAD_HASH_H
#define QTHREAD_HASH_H

#include <qthread/macros.h>
#include <qthread/common.h> /* important configuration options */
#include <qthread/qthread.h> /* for uint64_t, uint8_t, and aligned_t types */
#include "macros.h"
#include "common.h" /* important configuration options */
#include "qthread.h" /* for uint64_t, uint8_t, and aligned_t types */

Q_STARTCXX /* */

Expand Down
2 changes: 1 addition & 1 deletion include/qthread/io.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef QTHREAD_IO_H
#define QTHREAD_IO_H

#include <qthread/macros.h>
#include "macros.h"

Q_STARTCXX
void qt_begin_blocking_action(void);
Expand Down
2 changes: 1 addition & 1 deletion include/qthread/omp_defines.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef OMP_DEFINES_H
#define OMP_DEFINES_H

#include <qthread/macros.h>
#include "macros.h"

// this file prototypes the OMP calls supplied by the Qthreads implementation
// the user is expected to use omp.h from amother implementation, but the
Expand Down
6 changes: 3 additions & 3 deletions include/qthread/qarray.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef QTHREAD_QARRAY_H
#define QTHREAD_QARRAY_H

#include <qthread/qthread-int.h>
#include <qthread/macros.h>
#include <qthread/qloop.h>
#include "qthread-int.h"
#include "macros.h"
#include "qloop.h"

Q_STARTCXX /* */
typedef enum {
Expand Down
2 changes: 1 addition & 1 deletion include/qthread/qdqueue.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef QTHREAD_QDQUEUE_H
#define QTHREAD_QDQUEUE_H

#include <qthread/macros.h>
#include "macros.h"

Q_STARTCXX /* */
typedef struct qdqueue_s qdqueue_t;
Expand Down
2 changes: 1 addition & 1 deletion include/qthread/qlfqueue.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef QTHREAD_QLFQUEUE_H
#define QTHREAD_QLFQUEUE_H

#include <qthread/macros.h>
#include "macros.h"

Q_STARTCXX /* */

Expand Down
2 changes: 1 addition & 1 deletion include/qthread/qloop.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef QTHREAD_QLOOP
#define QTHREAD_QLOOP

#include <qthread/qthread.h>
#include "qthread.h"

Q_STARTCXX /* */
/* for convenient arguments to qt_loop */
Expand Down
2 changes: 1 addition & 1 deletion include/qthread/qloop.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef QLOOP_HPP
#define QLOOP_HPP

#include <qthread/qloop.h>
#include "qloop.h"

template <typename T>
void qloop_cpp_wrapper(size_t startat,
Expand Down
2 changes: 1 addition & 1 deletion include/qthread/qpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stddef.h> /* for size_t (according to C89) */

#include <qthread/macros.h>
#include "macros.h"

Q_STARTCXX /* */

Expand Down
2 changes: 1 addition & 1 deletion include/qthread/qswsrqueue.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef QTHREAD_QSWSRQUEUE_H
#define QTHREAD_QSWSRQUEUE_H

#include <qthread/macros.h>
#include "macros.h"

Q_STARTCXX /* */

Expand Down
2 changes: 1 addition & 1 deletion include/qthread/qt_syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <sys/resource.h> /* for struct rusage */
#include <poll.h> /* for struct pollfd and nfds_t */

#include <qthread/macros.h>
#include "macros.h"

Q_STARTCXX /* */

Expand Down
8 changes: 4 additions & 4 deletions include/qthread/qthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <errno.h> /* for ENOMEM */

#include <limits.h> /* for UINT_MAX (C89) */
#include <qthread/qthread-int.h> /* for uint32_t and uint64_t */
#include <qthread/common.h> /* important configuration options */
#include "qthread-int.h" /* for uint32_t and uint64_t */
#include "common.h" /* important configuration options */

#include <string.h> /* for memcpy() */

Expand Down Expand Up @@ -53,7 +53,7 @@

#define QTHREAD_VERSION 1010001

#include <qthread/macros.h>
#include "macros.h"

#ifdef QTHREAD_ALIGNEDDATA_ALLOWED
# define Q_ALIGNED(x) __attribute__((aligned(x)))
Expand Down Expand Up @@ -1639,7 +1639,7 @@ Q_ENDCXX /* */

#else /* ifdef __cplusplus */
extern "C++" {
# include <qthread/qthread.hpp>
# include "qthread.hpp"
}
#endif /* __cplusplus */

Expand Down
4 changes: 2 additions & 2 deletions include/qthread/qthread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include <limits>

#include <qthread/qthread.h>
#include <qthread/syncvar.hpp>
#include "qthread.h"
#include "syncvar.hpp"

template <bool> class OnlyTrue;
template <> class OnlyTrue<true>
Expand Down
2 changes: 1 addition & 1 deletion include/qthread/qtimer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef QTHREAD_TIMER
#define QTHREAD_TIMER

#include <qthread/macros.h>
#include "macros.h"

Q_STARTCXX /* */

Expand Down
2 changes: 1 addition & 1 deletion include/qthread/qutil.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef QTHREAD_QUTIL_H
#define QTHREAD_QUTIL_H

#include <qthread/qthread.h>
#include "qthread.h"

Q_STARTCXX /* */

Expand Down
2 changes: 1 addition & 1 deletion include/qthread/sinc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef QT_SINC_H
#define QT_SINC_H
#include <qthread/macros.h>
#include "macros.h"

Q_STARTCXX /* */

Expand Down
2 changes: 1 addition & 1 deletion include/qthread/spr.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef SPR_H
#define SPR_H

#include <qthread/qthread.h>
#include "qthread.h"

Q_STARTCXX /* */

Expand Down
2 changes: 1 addition & 1 deletion include/qthread/syncvar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define QTHREAD_SYNCVAR_HPP

#include <assert.h>
#include <qthread/qthread.h>
#include "qthread.h"

class syncvar;

Expand Down
2 changes: 2 additions & 0 deletions include/qthread/top/qthread.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

#include "qthread/qthread.h"
2 changes: 1 addition & 1 deletion include/qthread/wavefront.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef QTHREAD_WAVEFRONT_H
#define QTHREAD_WAVEFRONT_H

#include <qthread/qarray.h>
#include "qarray.h"

Q_STARTCXX /* */
typedef void (*wave_comp_f)(const void *restrict left,
Expand Down

0 comments on commit 54c6912

Please sign in to comment.