Smith  0.1
Smith is an implicit thermal structural mechanics simulation code.
Functions
smith::accelerator Namespace Reference

Namespace for methods involving accelerator-enabled builds. More...

Functions

void initializeDevice (ExecutionSpace exec_space)
 Initializes the device (GPU) More...
 
void terminateDevice ()
 Cleans up the device, if applicable.
 
template<ExecutionSpace exec, typename T >
std::shared_ptr< T[]> make_shared_array (std::size_t n)
 create shared_ptr to an array of n values of type T, either on the host or device More...
 
template<ExecutionSpace exec, typename... T>
auto make_shared_arrays (std::size_t n)
 create shared_ptr to an array of n values of type T, either on the host or device More...
 

Detailed Description

Namespace for methods involving accelerator-enabled builds.

Function Documentation

◆ initializeDevice()

void smith::accelerator::initializeDevice ( ExecutionSpace  exec_space)

Initializes the device (GPU)

Note
This function should only be called once

Definition at line 24 of file accelerator.cpp.

◆ make_shared_array()

template<ExecutionSpace exec, typename T >
std::shared_ptr<T[]> smith::accelerator::make_shared_array ( std::size_t  n)

create shared_ptr to an array of n values of type T, either on the host or device

Template Parameters
Tthe type of the value to be stored in the array
execthe memory space where the data lives
Parameters
nhow many entries to allocate in the array

Definition at line 284 of file accelerator.hpp.

◆ make_shared_arrays()

template<ExecutionSpace exec, typename... T>
auto smith::accelerator::make_shared_arrays ( std::size_t  n)

create shared_ptr to an array of n values of type T, either on the host or device

Template Parameters
Tthe type of the value to be stored in the array
execthe memory space where the data lives
Parameters
nhow many entries to allocate in the array

Definition at line 307 of file accelerator.hpp.