• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #include <executorch/backends/vulkan/runtime/graph/containers/Constant.h>
10 
11 namespace vkcompute {
12 
TensorRef(const std::vector<int64_t> & t_sizes,vkapi::ScalarType t_dtype,const void * const t_data)13 TensorRef::TensorRef(
14     const std::vector<int64_t>& t_sizes,
15     vkapi::ScalarType t_dtype,
16     const void* const t_data)
17     : sizes{}, dtype{t_dtype}, data{t_data} {
18   size_t ndim = t_sizes.size();
19   sizes.resize(ndim);
20   for (int i = 0; i < ndim; ++i) {
21     sizes[i] = t_sizes.at(i);
22   }
23 }
24 
25 } // namespace vkcompute
26