github.com/igggame/nebulas-go@v2.1.0+incompatible/nbre/ir/nr/nr_release_v1.cpp (about) 1 // Copyright (C) 2018 go-nebulas authors 2 // 3 // This file is part of the go-nebulas library. 4 // 5 // the go-nebulas library is free software: you can redistribute it and/or 6 // modify 7 // it under the terms of the GNU General Public License as published by 8 // the Free Software Foundation, either version 3 of the License, or 9 // (at your option) any later version. 10 // 11 // the go-nebulas library is distributed in the hope that it will be useful, 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 // GNU General Public License for more details. 15 // 16 // You should have received a copy of the GNU General Public License 17 // along with the go-nebulas library. If not, see 18 // <http://www.gnu.org/licenses/>. 19 // 20 21 #include "runtime/nr/impl/nr_impl.h" 22 23 neb::rt::nr::nr_ret_type entry_point_nr(neb::compatible_uint64_t start_block, 24 neb::compatible_uint64_t end_block) { 25 auto to_version_t = [](uint32_t major_version, uint16_t minor_version, 26 uint16_t patch_version) -> neb::rt::nr::version_t { 27 return (0ULL + major_version) + ((0ULL + minor_version) << 32) + 28 ((0ULL + patch_version) << 48); 29 }; 30 31 neb::compatible_uint64_t a = 100; 32 neb::compatible_uint64_t b = 2; 33 neb::compatible_uint64_t c = 6; 34 neb::compatible_uint64_t d = -9; 35 neb::rt::nr::nr_float_t theta = 1; 36 neb::rt::nr::nr_float_t mu = 1; 37 neb::rt::nr::nr_float_t lambda = 2; 38 return neb::rt::nr::entry_point_nr_impl(start_block, end_block, 39 to_version_t(0, 0, 1), a, b, c, d, 40 theta, mu, lambda); 41 } 42