JayBeams  0.1
Another project to have fun coding.
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
jb::clfft::clfft_error Class Reference

A run-time clFFT error. More...

#include <error.hpp>

Inheritance diagram for jb::clfft::clfft_error:

Public Member Functions

 clfft_error (cl_int error, char const *msg)
 Constructor from a clFFT error code and a message. More...
 
 ~clfft_error () noexcept
 Destructor. More...
 
cl_int error_code () const noexcept
 Returns the numeric error code. More...
 

Static Public Member Functions

static std::string to_string (cl_int error)
 Convert error code to a string. More...
 

Private Member Functions

std::string to_what (cl_int error, char const *msg)
 Generate a what() string given an error code and message. More...
 

Private Attributes

cl_int error_
 
std::string what_
 

Detailed Description

A run-time clFFT error.

This class represents an error return a clFFT function.

Definition at line 15 of file error.hpp.

Constructor & Destructor Documentation

◆ clfft_error()

jb::clfft::clfft_error::clfft_error ( cl_int  error,
char const *  msg 
)

Constructor from a clFFT error code and a message.

Definition at line 8 of file error.cpp.

◆ ~clfft_error()

jb::clfft::clfft_error::~clfft_error ( )
inlinenoexcept

Destructor.

Definition at line 21 of file error.hpp.

Member Function Documentation

◆ error_code()

cl_int jb::clfft::clfft_error::error_code ( ) const
inlinenoexcept

Returns the numeric error code.

Definition at line 25 of file error.hpp.

References error_, to_string(), and to_what().

◆ to_string()

std::string jb::clfft::clfft_error::to_string ( cl_int  error)
static

Convert error code to a string.

Definition at line 13 of file error.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), error_code(), and to_what().

◆ to_what()

std::string jb::clfft::clfft_error::to_what ( cl_int  error,
char const *  msg 
)
private

Generate a what() string given an error code and message.

Definition at line 50 of file error.cpp.

References to_string().

Referenced by error_code().

Member Data Documentation

◆ error_

cl_int jb::clfft::clfft_error::error_
private

Definition at line 37 of file error.hpp.

Referenced by error_code().

◆ what_

std::string jb::clfft::clfft_error::what_
private

Definition at line 38 of file error.hpp.


The documentation for this class was generated from the following files: