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/SymInt.h> 10 11 namespace vkcompute { 12 SymInt(api::Context * context_p,const int32_t val)13SymInt::SymInt(api::Context* context_p, const int32_t val) 14 : gpu_buffer(context_p, val){}; 15 set(const int32_t val)16void SymInt::set(const int32_t val) { 17 gpu_buffer.update(val); 18 } 19 get()20int32_t SymInt::get() { 21 return gpu_buffer.read<int32_t>(); 22 } 23 operator =(const int32_t val)24void SymInt::operator=(const int32_t val) { 25 gpu_buffer.update(val); 26 } 27 28 } // namespace vkcompute 29