You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

opr_impl.h 1.1 kB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * \file dnn/src/naive/split/opr_impl.h
  3. * MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
  4. *
  5. * Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
  6. *
  7. * Unless required by applicable law or agreed to in writing,
  8. * software distributed under the License is distributed on an
  9. * "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. */
  11. #pragma once
  12. #include "megdnn/oprs.h"
  13. namespace megdnn {
  14. namespace naive {
  15. class SplitForwardImpl : public SplitForward {
  16. public:
  17. using SplitForward::SplitForward;
  18. void exec(
  19. _megdnn_tensor_in src, const TensorNDArray& dsts,
  20. _megdnn_workspace workspace) override;
  21. size_t get_workspace_in_bytes(
  22. const TensorLayout&, const TensorLayoutArray& dsts) override {
  23. return sizeof(size_t) * dsts.size();
  24. }
  25. private:
  26. template <typename T>
  27. void exec_internal(
  28. _megdnn_tensor_in src, const TensorNDArray& dsts,
  29. _megdnn_workspace workspace_size);
  30. };
  31. } // namespace naive
  32. } // namespace megdnn
  33. // vim: syntax=cpp.doxygen