virtual bool isFloatTensor(uint32_t n) const = 0;
virtual void getMutableFloatTensor(uint32_t n, const TypedAccessor<float> &cb) = 0;
- void
- getMutableFloatTensor(uint32_t n,
- const std::function<void(nncc::core::ADT::tensor::Accessor<float> &)> &f)
- {
- getMutableFloatTensor(n, [&f](const TensorContext &, uint32_t,
- nncc::core::ADT::tensor::Accessor<float> &t) { f(t); });
- }
virtual void getConstFloatTensor(uint32_t n, const TypedReader<float> &cb) const = 0;
- void getConstFloatTensor(
- uint32_t n,
- const std::function<void(const nncc::core::ADT::tensor::Reader<float> &)> &f) const
- {
- getConstFloatTensor(n, [&f](const TensorContext &, uint32_t,
- const nncc::core::ADT::tensor::Reader<float> &t) { f(t); });
- }
};
} // namespace nnkit