Serac  0.1
Serac is an implicit thermal strucural mechanics simulation code.
Functions
serac::accelerator Namespace Reference

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

Functions

void initializeDevice ()
 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 serac::accelerator::initializeDevice ( )

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[]> serac::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 258 of file accelerator.hpp.

◆ make_shared_arrays()

template<ExecutionSpace exec, typename... T>
auto serac::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 281 of file accelerator.hpp.