nnlib
GPU-accelerated, C/C++ neural network library.
Functions
location_verifiers.cpp File Reference

Header file defining methods to verify multiple DataLocation at once. More...

#include "location_verifiers.h"
#include <algorithm>

Functions

bool allLocationsAreSame (std::initializer_list< DataLocation > locations)
 Return true if all given locations are the same. More...
 
bool allLocationsAreHost (std::initializer_list< DataLocation > locations)
 Return true if all given locations are HOST. More...
 
bool allLocationsAreDevice (std::initializer_list< DataLocation > locations)
 Return true if all given locations are DEVICE. More...
 

Detailed Description

Header file defining methods to verify multiple DataLocation at once.

Author
Jan Warchocki
Date
28 May 2022

Function Documentation

◆ allLocationsAreDevice()

bool allLocationsAreDevice ( std::initializer_list< DataLocation locations)

Return true if all given locations are DEVICE.

Parameters
locationsThe list of locations to verify.
Returns
True if all locations are DEVICE, false otherwise.

◆ allLocationsAreHost()

bool allLocationsAreHost ( std::initializer_list< DataLocation locations)

Return true if all given locations are HOST.

Parameters
locationsThe list of locations to verify.
Returns
True if all locations are HOST, false otherwise.

◆ allLocationsAreSame()

bool allLocationsAreSame ( std::initializer_list< DataLocation locations)

Return true if all given locations are the same.

Parameters
locationsThe list of locations to verify.
Returns
True if all locations are the same, false otherwise.