YASK
Yet Another Stencil Kit: a software framework for creating HPC stencil code. Copyright 2014-2023 Intel Corporation.
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
YASK Common

Classes

class  yask::yask_exception
 Exception from YASK framework. More...
 
class  yask::yask_output_factory
 Factory to create output objects. More...
 
class  yask::yask_output
 Base interface for output. More...
 
class  yask::yask_file_output
 File output. More...
 
class  yask::yask_string_output
 String output. More...
 
class  yask::yask_stdout_output
 Stdout output. More...
 
class  yask::yask_null_output
 Null output. More...
 
class  yask::command_line_parser
 A class to parse command-line arguments. More...
 

Macros

#define THROW_YASK_EXCEPTION(message)
 Macro for creating and throwing a yask_exception with a string.
 
#define FORMAT_AND_THROW_YASK_EXCEPTION(message)
 Macro for creating and throwing a yask_exception using stream operators.
 

Typedefs

typedef YASK_INT64_T yask::idx_t
 Type to use for indexing grids.
 
typedef std::vector< idx_tyask::idx_t_vec
 Vector of indices.
 
typedef std::initializer_list< idx_tyask::idx_t_init_list
 Initializer list of indices.
 
typedef std::vector< std::string > yask::string_vec
 Vector of strings.
 
typedef std::shared_ptr< yask_outputyask::yask_output_ptr
 Shared pointer to yask_output.
 
typedef std::shared_ptr< yask_file_outputyask::yask_file_output_ptr
 Shared pointer to yask_file_output.
 
typedef std::shared_ptr< yask_string_outputyask::yask_string_output_ptr
 Shared pointer to yask_string_output.
 
typedef std::shared_ptr< yask_stdout_outputyask::yask_stdout_output_ptr
 Shared pointer to yask_stdout_output.
 
typedef std::shared_ptr< yask_null_outputyask::yask_null_output_ptr
 Shared pointer to yask_null_output.
 

Functions

std::string yask::yask_get_version_string ()
 Version information.
 
std::vector< double > yask::get_center_fd_coefficients (int derivative_order, int radius)
 Create finite-difference (FD) coefficients for the standard center form.
 
std::vector< double > yask::get_forward_fd_coefficients (int derivative_order, int accuracy_order)
 Create finite-difference (FD) coefficients for the standard forward form.
 
std::vector< double > yask::get_backward_fd_coefficients (int derivative_order, int accuracy_order)
 Create finite-difference (FD) coefficients for the standard backward form.
 
std::vector< double > yask::get_arbitrary_fd_coefficients (int derivative_order, double eval_point, const std::vector< double > sample_points)
 Create finite-difference (FD) coefficients at arbitrary evaluation and sample points.
 
void yask::yask_print_splash (std::ostream &os, int argc, char **argv, std::string invocation_leader="invocation: ")
 Print a YASK spash message to os.
 

Detailed Description

Types, clases, and functions used in both the YASK Stencil Compiler API and YASK Stencil Kernel API.

Macro Definition Documentation

◆ THROW_YASK_EXCEPTION

#define THROW_YASK_EXCEPTION (   message)
Value:
do { \
auto msg = std::string("YASK error: ") + message; \
yask_exception e(msg); \
throw e; \
} while(0)

Macro for creating and throwing a yask_exception with a string.

Example: THROW_YASK_EXCEPTION("all your base are belong to us");

Note
Not available in the Python API.

◆ FORMAT_AND_THROW_YASK_EXCEPTION

#define FORMAT_AND_THROW_YASK_EXCEPTION (   message)
Value:
do { \
std::stringstream err; \
err << message; \
THROW_YASK_EXCEPTION(err.str()); \
} while(0)

Macro for creating and throwing a yask_exception using stream operators.

Example: FORMAT_AND_THROW_YASK_EXCEPTION("bad value: x = " << x);

Note
Not available in the Python API.

Typedef Documentation

◆ idx_t

Type to use for indexing grids.

Index types are signed to allow negative indices in padding/halos.

◆ idx_t_init_list

typedef std::initializer_list<idx_t> yask::idx_t_init_list

Initializer list of indices.

Note
This type is not available in the Python API. Use idx_t_vec instead.

Function Documentation

◆ yask_get_version_string()

std::string yask::yask_get_version_string ( )

Version information.

Returns
String describing the current version.

◆ get_center_fd_coefficients()

std::vector< double > yask::get_center_fd_coefficients ( int  derivative_order,
int  radius 
)

Create finite-difference (FD) coefficients for the standard center form.

Find FD coefficients with radius sample points to both the left and right of the center sample and evaluation point on a uniformly-spaced grid. The FD has radius * 2-order accuracy.

Returns
radius * 2 + 1 FD coefficients.
Parameters
[in]derivative_order1 for 1st derivative, 2 for 2nd, etc.
[in]radiusNumber of points to either side of the center point.

◆ get_forward_fd_coefficients()

std::vector< double > yask::get_forward_fd_coefficients ( int  derivative_order,
int  accuracy_order 
)

Create finite-difference (FD) coefficients for the standard forward form.

Find FD coefficients with accuracy_order sample points to the right of the center sample and evaluation point on a uniformly-spaced grid.

Returns
accuracy_order + 1 FD coefficients.
Parameters
[in]derivative_order1 for 1st derivative, 2 for 2nd, etc.
[in]accuracy_orderNumber of points to the right of the center point.

◆ get_backward_fd_coefficients()

std::vector< double > yask::get_backward_fd_coefficients ( int  derivative_order,
int  accuracy_order 
)

Create finite-difference (FD) coefficients for the standard backward form.

Find FD coefficients with accuracy_order sample points to the left of the center sample and evaluation point on a uniformly-spaced grid.

Returns
accuracy_order + 1 FD coefficients.
Parameters
[in]derivative_order1 for 1st derivative, 2 for 2nd, etc.
[in]accuracy_orderNumber of points to the left of the center point.

◆ get_arbitrary_fd_coefficients()

std::vector< double > yask::get_arbitrary_fd_coefficients ( int  derivative_order,
double  eval_point,
const std::vector< double >  sample_points 
)

Create finite-difference (FD) coefficients at arbitrary evaluation and sample points.

Returns
sample_points FD coefficients.
Parameters
[in]derivative_order1 for 1st derivative, 2 for 2nd, etc.
[in]eval_pointLocation of evaluation point.
[in]sample_pointsLocations of sampled points. Must have at least 2.

◆ yask_print_splash()

void yask::yask_print_splash ( std::ostream &  os,
int  argc,
char **  argv,
std::string  invocation_leader = "invocation: " 
)

Print a YASK spash message to os.

Splash message contains the YASK copyright, URL, and version. If argc > 1, also prints invocation_leader followed by the program invocation string.

Note
Not available in the Python API.