Files
rocm-systems/samples/common/hsa_base_test.h
T
Ramesh Errabolu (xN/A) TX d501deaef7 ECR #333755 - Enable the build of all samples Nbody, - - -, MatrixTranspose
[git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1130605]
2015-03-13 13:03:10 -05:00

48 lines
1.0 KiB
C++

#ifndef __HSA_BASE__
#define __HSA_BASE__
#include <vector>
#include "hsa.h"
#include "hsa_ext_finalize.h"
#include "hsa_ext_amd.h"
#include "hsatimer.h"
#include "utilities.h"
#include "assemble.hpp"
#include "common.hpp"
class HSA_TEST{
public:
HSA_TEST();
~HSA_TEST();
public:
void GetHsailNameAndKernelName(char *hail_file_name, char *kernel_name);
bool HsaInit();
void Close();
double Run(int dim, int group_x, int group_y, int group_z, int s_size, int grid_x, int grid_y, int grid_z, void* kernel_args, int kernel_args_size);
public:
hsa_status_t err;
uint32_t queue_size;
hsa_agent_t device;
char hail_file_name[128];
char hsa_kernel_name[128];
hsa_queue_t* command_queue;
hsa_signal_t hsa_signal;
//hsa_ext_brig_module_t* brig_module;
//hsa_ext_brig_module_handle_t module;
//hsa_ext_program_handle_t hsa_program;
//hsa_ext_code_descriptor_t *hsa_code_descriptor;
hsa_kernel_dispatch_packet_t dispatch_packet; // needs to be set manually each time
hsa_region_t hsa_kernarg_region;
};
#endif