Skip to content

Commit

Permalink
Updates to docs (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffburdick authored May 24, 2022
1 parent 972c0c5 commit a0b9282
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 7 deletions.
4 changes: 3 additions & 1 deletion docs_input/api/einsum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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``
Expand Down
2 changes: 1 addition & 1 deletion docs_input/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ API Reference
.. toctree::
:maxdepth: 4

class.rst
tensorview.rst
transformations.rst
tensorops.rst
tensorgenerators.rst
Expand Down
2 changes: 2 additions & 0 deletions docs_input/api/tensorgenerators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, 3> &x, const std::array<T, 3> &y)
.. doxygenfunction:: matx::meshgrid_y(const std::array<T, 3> &x, const std::array<T, 3> &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)
2 changes: 1 addition & 1 deletion docs_input/api/tensorview.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/fft_conv.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
29 changes: 26 additions & 3 deletions include/matx_tensor_generators.h
Original file line number Diff line number Diff line change
Expand Up @@ -1024,16 +1024,14 @@ 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.
*
* @tparam FreqType
* Frequency data type
* @tparam SpaceOp
* Operator type of spacer
* @tparam Method
* Chirp method (CHIRP_METHOD_LINEAR)
*
* @param t
* Vector representing values in time
Expand All @@ -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
*/
Expand All @@ -1054,6 +1054,29 @@ inline auto chirp(SpaceOp t, FreqType f0, typename SpaceOp::scalar_type t1, Freq
return detail::Chirp<SpaceOp, FreqType>(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 <typename SpaceOp, typename FreqType>
inline auto cchirp(SpaceOp t, FreqType f0, typename SpaceOp::scalar_type t1, FreqType f1, ChirpMethod method = ChirpMethod::CHIRP_METHOD_LINEAR)
{
Expand Down
2 changes: 2 additions & 0 deletions include/matx_tensor_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename T1>
Expand Down

0 comments on commit a0b9282

Please sign in to comment.