libSCALE  0.2.0
A modern C++ CUDA API
sp::Host Class Reference

Represents the host. More...

#include <Host.hpp>

Public Member Functions

int getId () const
 Get the device ID representing the host (cudaCpuDeviceId) More...
 
 operator int () const
 Implicitly convert to the device ID. More...
 

Static Public Member Functions

static Hostget ()
 Get the instance representing the host. More...
 

Detailed Description

Represents the host.

Usable like Device in cases where doing so makes sense (such as memory copies)

This essentially provides a degenerate version of the device API, and access to the special host allocation functions for getting pinned or write-combining memory.

Member Function Documentation

◆ get()

static Host & sp::Host::get ( )
static

Get the instance representing the host.

◆ getId()

int sp::Host::getId ( ) const

Get the device ID representing the host (cudaCpuDeviceId)

◆ operator int()

sp::Host::operator int ( ) const

Implicitly convert to the device ID.