brintos

brintos / llvm-project-archived public Read only

0
0
Text · 830 B · 7946a82 Raw
27 lines · plain
1//===------- Offload API tests - gtest environment ------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#pragma once10 11#include "llvm/Support/MemoryBuffer.h"12#include <OffloadAPI.h>13#include <gtest/gtest.h>14 15namespace TestEnvironment {16 17struct Device {18  ol_device_handle_t Handle;19  std::string Name;20};21 22const std::vector<Device> &getDevices();23ol_device_handle_t getHostDevice();24bool loadDeviceBinary(const std::string &BinaryName, ol_device_handle_t Device,25                      std::unique_ptr<llvm::MemoryBuffer> &BinaryOut);26} // namespace TestEnvironment27