#include <stdio.h>
#include <assert.h>
#include <time.h>
#include "toeplitz.h"
#include "cmdline_gpu.h"
#include "toeplitz_kernel.cu"
Go to the source code of this file.
Functions | |
void | parse_cmdline (int argc, char *argv[], struct gengetopt_args_info_gpu *args_info) |
void | assign_interval (extract_global_info *global, unsigned int num_device, unsigned int window_pos, unsigned int num_interval, unsigned int start_k) |
void | delete_extract_info (extract_global_info *global) |
int | calc_memory_parameters (extract_global_info *global, unsigned int max_window_size) |
void | prepare_devices (extract_global_info *global) |
int | main (int argc, char *argv[]) |
Variables | |
static struct gengetopt_args_info_gpu | args_info |
Definition in file gpu_eigen.cu.
void assign_interval | ( | extract_global_info * | global, | |
unsigned int | num_device, | |||
unsigned int | window_pos, | |||
unsigned int | num_interval, | |||
unsigned int | start_k | |||
) |
Assign a given interval to the current execution window. Detaches assignment if an invalid interval number is given.
global | Global multi-GPU extraction structure describing eigenvalue extraction environment. | |
num_device | Device number whose execution window should be used. | |
window_pos | Execution window position to be assigned. | |
num_interval | Index of the interval that should be assigned to execution window. | |
start_k | Iteration number where execution is going to start. |
Definition at line 85 of file gpu_eigen.cu.
int calc_memory_parameters | ( | extract_global_info * | global, | |
unsigned int | max_window_size | |||
) |
Calculate required shared memory and maximum supported execution window size according to GPU limitations. Window size written in the window_size attribute of the info parameter.
global | Global multi-GPU extraction structure describing eigenvalue extraction environment. | |
max_window_size | Maximum window size specified by the user. Set to 0 to use maximum possible size. |
TRUE
if enough global/shared memory to solve the problem. FALSE
otherwise. Definition at line 207 of file gpu_eigen.cu.
void delete_extract_info | ( | extract_global_info * | global | ) |
Releases all allocated memory for a multi-GPU eigenvalue extraction problem.
global | Global multi-GPU extraction structure describing eigenvalue extraction environment. |
Definition at line 152 of file gpu_eigen.cu.
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 366 of file gpu_eigen.cu.
void parse_cmdline | ( | int | argc, | |
char * | argv[], | |||
struct gengetopt_args_info_gpu * | args_info | |||
) |
Parse command line commands into args_info structure (uses gengetopt).
argc | Number of params in command line. | |
argv | Params of command line. | |
args_info | Structure to be filled with parsed input params. |
Definition at line 55 of file gpu_eigen.cu.
void prepare_devices | ( | extract_global_info * | global | ) |
Allocate required memory and initialize execution window of each device.
global | Global multi-GPU extraction structure describing eigenvalue extraction environment. |
Definition at line 302 of file gpu_eigen.cu.
struct gengetopt_args_info_gpu args_info [static] |
Definition at line 46 of file gpu_eigen.cu.