Expression Templates Library (ETL)
Classes | Macros | Functions
cublas.hpp File Reference

Utility functions for cublas. More...

#include "cublas_v2.h"
Include dependency graph for cublas.hpp:

Go to the source code of this file.

Classes

struct  etl::impl::cublas::cublas_handle
 RTTI helper to manage CUBLAS handle. More...
 

Macros

#define cublas_check(call)
 

Functions

const char * etl::impl::cublas::cublas_str (cublasStatus_t code)
 Returns the string representation of the given CUBLAS status code. More...
 
cublas_handle & etl::impl::cublas::start_cublas ()
 Start cublas and return a RTTI helper over a raw cublas handle. More...
 

Detailed Description

Utility functions for cublas.

Macro Definition Documentation

◆ cublas_check

#define cublas_check (   call)
Value:
{ \
auto status = call; \
if (status != CUBLAS_STATUS_SUCCESS) { \
std::cerr << "CUDA error: " << etl::impl::cublas::cublas_str(status) << " from " << #call << std::endl \
<< "from " << __FILE__ << ":" << __LINE__ << std::endl; \
} \
}
const char * cublas_str(cublasStatus_t code)
Returns the string representation of the given CUBLAS status code.
Definition: cublas.hpp:27

Function Documentation

◆ cublas_str()

const char* etl::impl::cublas::cublas_str ( cublasStatus_t  code)
inline

Returns the string representation of the given CUBLAS status code.

Parameters
codeThe CUBLAS status code
Returns
the string representation of the given status code

◆ start_cublas()

cublas_handle& etl::impl::cublas::start_cublas ( )
inline

Start cublas and return a RTTI helper over a raw cublas handle.

Returns
RTTI helper over a raw cublas handle