#include <stdlib.h>#include <stdio.h>#include <string.h>#include <math.h>#include "tmh_intf.h"#include <CL/cl.h>#include "tmh_ocl.h"#include "uth_log.h"
Functions | |
| void | DisplayPlatformInfo (FILE *Interactive_output, cl_platform_id id, cl_platform_info name, char *str) |
| void | DisplayDeviceInfo (FILE *Interactive_output, cl_device_id id, cl_device_info name, char *str) |
| int | tmr_init_multithreading_opencl (char *Work_dir, int Argc, char **Argv, FILE *Interactive_input, FILE *Interactive_output, int Control, int Monitor) |
| int | tmr_ocl_init (char *Work_dir, FILE *Interactive_input, FILE *Interactive_output, int Control, int Monitor) |
| int | tmr_ocl_create_contexts (FILE *Interactive_output, int Platform_id_in, int Monitor) |
| int | tmr_ocl_create_command_queues (FILE *Interactive_output, int Platform_index, int Device_type, int Monitor) |
| char * | tmr_ocl_readSource (FILE *Interactive_output, const char *kernelPath) |
| int | tmr_ocl_check_vendor () |
| int | wc (char *file_path, char *word) |
| int | tmr_ocl_create_kernel (FILE *Interactive_output, int Platform_index, int Device_index, int Kernel_index, char *Kernel_name, const char *Kernel_file, int Monitor) |
| int | tmr_ocl_get_current_platform_index () |
| int | tmr_ocl_get_current_device_type () |
| int | tmr_ocl_get_current_device () |
| int | tmr_ocl_select_device (FILE *Interactive_output, int Platform_index, int Device_tmc_type) |
| int | tmr_ocl_device_type (int Platform_index, int Device_index) |
| cl_device_id | tmr_ocl_select_device_id (int Platform_index, int Device_index) |
| cl_context | tmr_ocl_select_context (int Platform_index, int Device_index) |
| cl_command_queue | tmr_ocl_select_command_queue (int Platform_index, int Device_index) |
| cl_kernel | tmr_ocl_select_kernel (int Platform_index, int Device_index, int Kernel_index) |
| void | tmr_ocl_cleanup () |
| void | tmr_kernel_execution_log (cl_int error_code, int line_code, const char *function_name) |
| void | tmr_set_kernel_arguments_log (cl_int error_code, int argument_index, int line_code, const char *function_name) |
Variables | |
| tmt_ocl_struct | tmv_ocl_struct |
| void DisplayDeviceInfo | ( | FILE * | Interactive_output, | |
| cl_device_id | id, | |||
| cl_device_info | name, | |||
| char * | str | |||
| ) |

| void DisplayPlatformInfo | ( | FILE * | Interactive_output, | |
| cl_platform_id | id, | |||
| cl_platform_info | name, | |||
| char * | str | |||
| ) |

| int tmr_init_multithreading_opencl | ( | char * | Work_dir, | |
| int | Argc, | |||
| char ** | Argv, | |||
| FILE * | Interactive_input, | |||
| FILE * | Interactive_output, | |||
| int | Control, | |||
| int | Monitor | |||
| ) |


| void tmr_kernel_execution_log | ( | cl_int | error_code, | |
| int | line_code, | |||
| const char * | function_name | |||
| ) |

| int tmr_ocl_check_vendor | ( | ) |

| void tmr_ocl_cleanup | ( | ) |
-------------------------------------------------------- tmr_ocl_cleanup - discards created OpenCL resources ---------------------------------------------------------
| int tmr_ocl_create_command_queues | ( | FILE * | Interactive_output, | |
| int | Chosen_platform_index, | |||
| int | Chosen_device_type, | |||
| int | Monitor | |||
| ) |
-------------------------------------------------------- tmr_ocl_create_command_queues - for a selected platform and device ---------------------------------------------------------

| int tmr_ocl_create_contexts | ( | FILE * | Interactive_output, | |
| int | Chosen_platform_id, | |||
| int | Monitor | |||
| ) |
-------------------------------------------------------- tmr_ocl_create_contexts - to create OpenCL contexts on a selected platform ---------------------------------------------------------


| int tmr_ocl_create_kernel | ( | FILE * | Interactive_output, | |
| int | Platform_index, | |||
| int | Device_index, | |||
| int | Kernel_index, | |||
| char * | Kernel_name, | |||
| const char * | FileName, | |||
| int | Monitor | |||
| ) |
-------------------------------------------------------- tmr_ocl_create_kernel - for a selected platform, device and kernel index ---------------------------------------------------------

| int tmr_ocl_device_type | ( | int | Platform_index, | |
| int | Device_index | |||
| ) |
-------------------------------------------------------- tmr_ocl_device_type - returns LOCAL device type (INTEGER) ---------------------------------------------------------
| int tmr_ocl_get_current_device | ( | ) |
-------------------------------------------------------- tmr_ocl_get_current_device() - to return the index of current OpenCL device (selected based on compiler switches) ---------------------------------------------------------

| int tmr_ocl_get_current_device_type | ( | ) |
-------------------------------------------------------- tmr_ocl_get_current_device_type() - to return the type of current OpenCL device (selected based on compiler switches) ---------------------------------------------------------

| int tmr_ocl_get_current_platform_index | ( | ) |
-------------------------------------------------------- tmr_ocl_get_current_platform_index() - to return the index of current OpenCL platform ---------------------------------------------------------

| int tmr_ocl_init | ( | char * | Work_dir, | |
| FILE * | Interactive_input, | |||
| FILE * | Interactive_output, | |||
| int | Control, | |||
| int | Monitor | |||
| ) |
-------------------------------------------------------- tmr_ocl_init - to initialize OpenCL thread management ---------------------------------------------------------


| char* tmr_ocl_readSource | ( | FILE * | Interactive_output, | |
| const char * | kernelPath | |||
| ) |

| cl_command_queue tmr_ocl_select_command_queue | ( | int | Platform_index, | |
| int | Device_index | |||
| ) |
-------------------------------------------------------- tmr_ocl_select_command_queue - selects command queue for a given device ---------------------------------------------------------

| cl_context tmr_ocl_select_context | ( | int | Platform_index, | |
| int | Device_index | |||
| ) |
-------------------------------------------------------- tmr_ocl_select_context - selects context for a given device ---------------------------------------------------------

| int tmr_ocl_select_device | ( | FILE * | Interactive_output, | |
| int | Platform_index, | |||
| int | Device_tmc_type | |||
| ) |
-------------------------------------------------------- tmr_ocl_select_device returns OpenCL device index (for local data structures) or -1 if device is not available (not existing or not serviced) for the specified platform ---------------------------------------------------------


| cl_device_id tmr_ocl_select_device_id | ( | int | Platform_index, | |
| int | Device_index | |||
| ) |
--------------------------------------------------------- tmr_ocl_select_device_id - selects command queue for a given device ---------------------------------------------------------

| cl_kernel tmr_ocl_select_kernel | ( | int | Platform_index, | |
| int | Device_index, | |||
| int | Kernel_index | |||
| ) |
-------------------------------------------------------- tmr_ocl_select_kernel - selects kernel for a given device and kernel index ---------------------------------------------------------

| void tmr_set_kernel_arguments_log | ( | cl_int | error_code, | |
| int | argument_index, | |||
| int | line_code, | |||
| const char * | function_name | |||
| ) |

| int wc | ( | char * | file_path, | |
| char * | word | |||
| ) |

1.6.1