IgANet
IgANets - Isogeometric Analysis Networks
Loading...
Searching...
No Matches
tensorarray.hpp File Reference

TensorArray utility functions. More...

#include <array>
#include <initializer_list>
#include <options.hpp>
#include <utils/container.hpp>
#include <torch/torch.h>

Go to the source code of this file.

Namespaces

namespace  iganet
 
namespace  iganet::utils
 
namespace  iganet::utils::detail
 
namespace  std
 STL namespace.
 

Macros

#define TENSORARRAY_FORALL(obj, func, ...)
 

Typedefs

template<std::size_t N>
using iganet::utils::TensorArray = std::array< torch::Tensor, N >
 
using iganet::utils::TensorArray0 = TensorArray< 0 >
 
using iganet::utils::TensorArray1 = TensorArray< 1 >
 
using iganet::utils::TensorArray2 = TensorArray< 2 >
 
using iganet::utils::TensorArray3 = TensorArray< 3 >
 
using iganet::utils::TensorArray4 = TensorArray< 4 >
 

Functions

template<std::size_t N>
std::ostream & std::operator<< (std::ostream &os, const std::array< torch::Tensor, N > &obj)
 Print (as string) a TensorArray object.
 

Detailed Description

TensorArray utility functions.

Author
Matthias Moller

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Macro Definition Documentation

◆ TENSORARRAY_FORALL

#define TENSORARRAY_FORALL (   obj,
  func,
  ... 
)
Value:
[]<std::size_t N>(const ::iganet::utils::TensorArray<N> &tensorArray) { \
for (std::size_t i = 0; i < N; ++i) \
result[i] = tensorArray[i].func(__VA_ARGS__); \
return result; \
}(obj)
std::array< torch::Tensor, N > TensorArray
Definition tensorarray.hpp:28