File: common.hpp

package info (click to toggle)
rocr-runtime 6.4.3%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,888 kB
  • sloc: cpp: 126,824; ansic: 41,837; lisp: 1,225; asm: 905; sh: 452; python: 117; makefile: 59
file content (27 lines) | stat: -rw-r--r-- 591 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef COMMON_COMMON_HPP
#define COMMON_COMMON_HPP

#include <cstdlib>
#include <iostream>

#include "hsa.h"
#include "hsa_ext_finalize.h"
#include "hsa_ext_amd.h"

#if defined(_MSC_VER)
  #define ALIGNED_(x) __declspec(align(x))
#else
  #if defined(__GNUC__)
    #define ALIGNED_(x) __attribute__ ((aligned(x)))
  #endif // __GNUC__
#endif // _MSC_VER

#define MULTILINE(...) # __VA_ARGS__

void ErrorCheck(hsa_status_t hsa_error_code);

hsa_status_t FindGpuDevice(hsa_agent_t agent, void *data);

hsa_status_t FindHostRegion(hsa_region_t region, void *data);

#endif // COMMON_COMMON_HPP