|  | openGPMP
    Open Source Mathematics Package | 
OpenCL-based GPU acceleration. More...
#include "../../include/linalg/_gpu_mtx.h"#include <chrono>#include <iostream>#include <math.h>#include <random>#include <stddef.h>#include <stdio.h>#include <stdlib.h>#include <sys/time.h>#include <time.h>#include <vector>#include <CL/cl.h>Go to the source code of this file.
| Macros | |
| #define | CL_USE_DEPRECATED_OPENCL_1_2_APIS | 
| #define | CL_TARGET_OPENCL_VERSION 300 | 
| #define | MEM_SIZE (128) | 
| #define | MAX_SOURCE_SIZE (0x100000) | 
| #define | PRINT_LINE(title) printf("\n========== %s ==========\n", title); | 
| #define | MAX_SOURCE_SIZE (0x100000) | 
| Functions | |
| void | checkError (cl_int status, const char *errorMsg) | 
| void | gpu_mtx_add (const std::vector< std::vector< int >> &A, const std::vector< std::vector< int >> &B, std::vector< std::vector< int >> &C) | 
| int | main () | 
OpenCL-based GPU acceleration.
Definition in file _gpu_mtx.cpp.
| #define CL_TARGET_OPENCL_VERSION 300 | 
Definition at line 52 of file _gpu_mtx.cpp.
| #define CL_USE_DEPRECATED_OPENCL_1_2_APIS | 
Definition at line 51 of file _gpu_mtx.cpp.
| #define MAX_SOURCE_SIZE (0x100000) | 
Definition at line 65 of file _gpu_mtx.cpp.
| #define MAX_SOURCE_SIZE (0x100000) | 
Definition at line 65 of file _gpu_mtx.cpp.
| #define MEM_SIZE (128) | 
Definition at line 61 of file _gpu_mtx.cpp.
| #define PRINT_LINE | ( | title | ) | printf("\n========== %s ==========\n", title); | 
Definition at line 63 of file _gpu_mtx.cpp.
| void checkError | ( | cl_int | status, | 
| const char * | errorMsg | ||
| ) | 
Definition at line 68 of file _gpu_mtx.cpp.
Referenced by gpu_mtx_add().
| void gpu_mtx_add | ( | const std::vector< std::vector< int >> & | A, | 
| const std::vector< std::vector< int >> & | B, | ||
| std::vector< std::vector< int >> & | C | ||
| ) | 
Definition at line 75 of file _gpu_mtx.cpp.
References python.linalg::A, python.linalg::B, python.linalg::C, checkError(), MAX_SOURCE_SIZE, and N.
Referenced by main().
| int main | ( | void | ) | 
Definition at line 243 of file _gpu_mtx.cpp.
References python.linalg::A, python.linalg::B, python.linalg::C, gpu_mtx_add(), and matrixSize.