From 67e117594d63ead5640d7cceaf83afb0209cad06 Mon Sep 17 00:00:00 2001 From: cliffburdick Date: Tue, 24 May 2022 07:51:01 -0700 Subject: [PATCH] Updates to docs --- docs_input/api/einsum.rst | 4 +++- docs_input/api/index.rst | 2 +- docs_input/api/tensorgenerators.rst | 2 ++ docs_input/api/tensorview.rst | 2 +- examples/fft_conv.cu | 2 +- include/matx_tensor_generators.h | 29 ++++++++++++++++++++++++++--- include/matx_tensor_ops.h | 2 ++ 7 files changed, 36 insertions(+), 7 deletions(-) diff --git a/docs_input/api/einsum.rst b/docs_input/api/einsum.rst index 9e2bdb9c..0194f56a 100644 --- a/docs_input/api/einsum.rst +++ b/docs_input/api/einsum.rst @@ -3,6 +3,8 @@ einsum ###### +.. versionadded:: 0.2.3 + MatX provides an ``einsum`` function similar to the one found in NumPy. ``einsum`` allows a brief syntax to express many different operations in an optimized manner. A non-exhaustive list of ``einsum`` operations are: @@ -31,7 +33,7 @@ is an opt-in feature when configuring MatX. To add support, add the following CM .. code-block:: shell - -DEN_CUTENSOR=ON + -DMATX_EN_CUTENSOR=ON Both cuTENSOR and cuTensorNet can have their location specified using ``cutensor_DIR`` and ``cutensornet_DIR``, respectively. If these are not specified, CMake will attempt to download both libraries from the internet. ``einsum`` diff --git a/docs_input/api/index.rst b/docs_input/api/index.rst index ab8c9300..2f99dfca 100644 --- a/docs_input/api/index.rst +++ b/docs_input/api/index.rst @@ -6,7 +6,7 @@ API Reference .. toctree:: :maxdepth: 4 - class.rst + tensorview.rst transformations.rst tensorops.rst tensorgenerators.rst diff --git a/docs_input/api/tensorgenerators.rst b/docs_input/api/tensorgenerators.rst index 92d980fd..de09f4b0 100644 --- a/docs_input/api/tensorgenerators.rst +++ b/docs_input/api/tensorgenerators.rst @@ -32,3 +32,5 @@ since their only purpose is to compute a single value at a particular location b .. doxygenfunction:: matx::logspace(const index_t (&s)[RANK], T first, T last) .. doxygenfunction:: matx::meshgrid_x(const std::array &x, const std::array &y) .. doxygenfunction:: matx::meshgrid_y(const std::array &x, const std::array &y) +.. doxygenfunction:: matx::signal::chirp(SpaceOp t, FreqType f0, typename SpaceOp::scalar_type t1, FreqType f1, ChirpMethod method) +.. doxygenfunction:: matx::signal::cchirp(SpaceOp t, FreqType f0, typename SpaceOp::scalar_type t1, FreqType f1, ChirpMethod method) diff --git a/docs_input/api/tensorview.rst b/docs_input/api/tensorview.rst index 07bda561..e57e0ef7 100644 --- a/docs_input/api/tensorview.rst +++ b/docs_input/api/tensorview.rst @@ -1,6 +1,6 @@ .. _tensorview_api: -tensor_t +Tensors ######## tensor_t is the main tensor class in MatX used for tensor operations. The member functions allow different ways diff --git a/examples/fft_conv.cu b/examples/fft_conv.cu index 22bf4c59..210f6c81 100644 --- a/examples/fft_conv.cu +++ b/examples/fft_conv.cu @@ -66,7 +66,7 @@ using namespace matx; * there is some buffer and 3 FFT operations (2 for FFT of signal and filter, * and 1 IFFT after the multiply) that causes the setup time to dominate. * - **/ +**/ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv) { MATX_ENTER_HANDLER(); diff --git a/include/matx_tensor_generators.h b/include/matx_tensor_generators.h index 59bf5106..b83bd0d2 100644 --- a/include/matx_tensor_generators.h +++ b/include/matx_tensor_generators.h @@ -1024,7 +1024,7 @@ class ComplexChirp { namespace signal { /** - * Creates a chirp signal (swept-frequency cosine) + * Creates a real chirp signal (swept-frequency cosine) * * SpaceOp provides the time vector with custom spacing. * @@ -1032,8 +1032,6 @@ namespace signal { * Frequency data type * @tparam SpaceOp * Operator type of spacer - * @tparam Method - * Chirp method (CHIRP_METHOD_LINEAR) * * @param t * Vector representing values in time @@ -1043,6 +1041,8 @@ namespace signal { * Time for f1 * @param f1 * Frequency (Hz) at time t1 + * @param method + * Chirp method (CHIRP_METHOD_LINEAR) * * @returns The chirp operator */ @@ -1054,6 +1054,29 @@ inline auto chirp(SpaceOp t, FreqType f0, typename SpaceOp::scalar_type t1, Freq return detail::Chirp(t, f0, t1, f1, method); } +/** + * Creates a complex chirp signal (swept-frequency cosine) + * + * SpaceOp provides the time vector with custom spacing. + * + * @tparam FreqType + * Frequency data type + * @tparam SpaceOp + * Operator type of spacer + * + * @param t + * Vector representing values in time + * @param f0 + * Instantenous frequency at time 0 + * @param t1 + * Time for f1 + * @param f1 + * Frequency (Hz) at time t1 + * @param method + * Chirp method (CHIRP_METHOD_LINEAR) + * + * @returns The chirp operator + */ template inline auto cchirp(SpaceOp t, FreqType f0, typename SpaceOp::scalar_type t1, FreqType f1, ChirpMethod method = ChirpMethod::CHIRP_METHOD_LINEAR) { diff --git a/include/matx_tensor_ops.h b/include/matx_tensor_ops.h index 9ef45287..978b06f9 100644 --- a/include/matx_tensor_ops.h +++ b/include/matx_tensor_ops.h @@ -1742,6 +1742,8 @@ auto __MATX_INLINE__ as_uint8(T t) * Type of View/Op * @param t * View/Op to shift + * @param orig + * Original size. Needed to disambiguate between integer division giving same output size * */ template