# C++ / CUDA API

These built-in APIs provide pre-defined functions for performing mathematical and material-related tasks. All functions are declared as both `__host__` and `__device__`, which means they will work on both C++ and CUDA. Implementation of the functions are in `mat_user_functions.h` and are part of the `mat` namespace. To use them, prepend `mat::` before each function.

    double sig_eff = mat::mat_effective_stress(stress);