ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
cuda.hpp File Reference

Implementations for the CUDA backend functionality. More...

#include <iostream>
#include <vector>
#include <cassert>
#include <stdexcept>
#include <sstream>
#include "viennacl/forwards.h"
#include "viennacl/tools/shared_ptr.hpp"
#include <cuda_runtime.h>

Go to the source code of this file.

Classes

class  viennacl::backend::cuda::cuda_exception
 
struct  viennacl::backend::cuda::detail::cuda_deleter< U >
 Functor for deleting a CUDA handle. Used within the smart pointer class. More...
 

Namespaces

 viennacl
 Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
 
 viennacl::backend
 Namespace providing routines for handling the different memory domains.
 
 viennacl::backend::cuda
 Provides implementations for handling CUDA memory buffers.
 
 viennacl::backend::cuda::detail
 Holds implementation details for handling CUDA memory buffers. Not intended for direct use by library users.
 

Macros

#define VIENNACL_CUDA_ERROR_CHECK(err)   detail::cuda_error_check (err, __FILE__, __LINE__)
 

Typedefs

typedef viennacl::tools::shared_ptr< char > viennacl::backend::cuda::handle_type
 

Functions

void viennacl::backend::cuda::detail::cuda_error_check (cudaError error_code, const char *file, const int line)
 
handle_type viennacl::backend::cuda::memory_create (vcl_size_t size_in_bytes, const void *host_ptr=NULL)
 Creates an array of the specified size on the CUDA device. If the second argument is provided, the buffer is initialized with data from that pointer. More...
 
void viennacl::backend::cuda::memory_copy (handle_type const &src_buffer, handle_type &dst_buffer, vcl_size_t src_offset, vcl_size_t dst_offset, vcl_size_t bytes_to_copy)
 Copies 'bytes_to_copy' bytes from address 'src_buffer + src_offset' on the CUDA device to memory starting at address 'dst_buffer + dst_offset' on the same CUDA device. More...
 
void viennacl::backend::cuda::memory_write (handle_type &dst_buffer, vcl_size_t dst_offset, vcl_size_t bytes_to_copy, const void *ptr, bool async=false)
 Writes data from main RAM identified by 'ptr' to the CUDA buffer identified by 'dst_buffer'. More...
 
void viennacl::backend::cuda::memory_read (handle_type const &src_buffer, vcl_size_t src_offset, vcl_size_t bytes_to_copy, void *ptr, bool async=false)
 Reads data from a CUDA buffer back to main RAM. More...
 

Detailed Description

Implementations for the CUDA backend functionality.

Definition in file cuda.hpp.

Macro Definition Documentation

#define VIENNACL_CUDA_ERROR_CHECK (   err)    detail::cuda_error_check (err, __FILE__, __LINE__)

Definition at line 38 of file cuda.hpp.