Home
last modified time | relevance | path

Searched refs:seed (Results 1 – 25 of 74) sorted by relevance

123

/ohos5.0/foundation/graphic/graphic_3d/lume/LumeBase/api/base/util/
H A Dhash.h140 inline void HashCombine(uint64_t& seed, const T& v) in HashCombine() argument
145 seed ^= hash(v) + GOLDEN_RATIO + (seed << ROTL) + (seed >> ROTR); in HashCombine()
149 inline void HashCombine(uint64_t& seed, const Rest&... rest) in HashCombine() argument
151 (HashCombine(seed, rest), ...); in HashCombine()
157 uint64_t seed = 0; in Hash() local
158 (HashCombine(seed, BASE_NS::forward<Rest>(rest)), ...); in Hash()
159 return seed; in Hash()
165 uint64_t seed = 0; in HashRange() local
167 HashCombine(seed, *first); in HashRange()
170 return seed; in HashRange()
[all …]
/ohos5.0/foundation/graphic/graphic_3d/lume/metaobject/src/
H A Drandom.cpp24 Xoroshiro128(uint64_t seed) in Xoroshiro128() argument
26 Initialize(seed); in Xoroshiro128()
30 void Initialize(uint64_t seed) override in Initialize() argument
33 uint64_t z = (seed += 0x9e3779b97f4a7c15); in Initialize()
37 z = (seed += 0x9e3779b97f4a7c15); in Initialize()
41 z = (seed += 0x9e3779b97f4a7c15); in Initialize()
45 z = (seed += 0x9e3779b97f4a7c15); in Initialize()
74 BASE_NS::unique_ptr<IRandom> CreateXoroshiro128(uint64_t seed) in CreateXoroshiro128() argument
76 return BASE_NS::unique_ptr<IRandom>(new Xoroshiro128(seed)); in CreateXoroshiro128()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/image/
H A Dimage_compressor.cpp377 seed ^= seed >> 15;
380 seed *= 0xEEDE0891;
381 seed ^= seed >> 5;
382 seed += seed << 16;
383 seed ^= seed >> 7;
384 seed ^= seed >> 3;
385 seed ^= seed << 6;
386 seed ^= seed >> 17;
387 return seed;
413 uint32_t num = Hash52(seed);
[all …]
/ohos5.0/foundation/communication/netstack/interfaces/innerkits/rust/ylong_http_client/src/reqwest_impl/
H A Dutil.rs26 static RNG: Cell<Wrapping<u64>> = Cell::new(Wrapping(seed())); in xor_shift()
30 fn seed() -> u64 { in xor_shift() function
31 let seed = RandomState::new(); in xor_shift() localVariable
35 let mut hasher = seed.build_hasher(); in xor_shift()
44 hasher = seed.build_hasher(); in xor_shift()
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/drawing_ets/ets/utils/
H A DOHRandom.ts31 public constructor(seed ?: number ) {
32 console.log(TAG, 'create TestBase seed is:' + seed);
33 if (seed !== undefined) {
34 this.init(seed);
41 public init(seed : number) {
42 this.fk = KKMUL * seed + KADD;
/ohos5.0/commonlibrary/rust/ylong_runtime/ylong_runtime/src/
H A Dfastrand.rs32 static RNG: Cell<Wrapping<u64>> = Cell::new(Wrapping(seed())); in fast_random()
45 fn seed() -> u64 { in seed() function
46 let seed = RandomState::new(); in seed() localVariable
52 let mut hasher = seed.build_hasher(); in seed()
/ohos5.0/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/rand/src/
H A Drand_openssl.c76 static void OpensslSetSeed(HcfRandSpi *self, HcfBlob *seed) in OpensslSetSeed() argument
79 if (seed == NULL) { in OpensslSetSeed()
83 OpensslRandSeed(seed->data, seed->len); in OpensslSetSeed()
/ohos5.0/base/time/time_service/services/timer/src/
H A Dbatch.cpp29 Batch::Batch(const TimerInfo &seed) in Batch() argument
30 : start_ {seed.whenElapsed}, in Batch()
31 end_ {seed.maxWhenElapsed},
32 flags_ {seed.flags},
33 alarms_ {std::make_shared<TimerInfo>(seed)}
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/drawing_ndk/cpp/
H A Dtest_common.h40 explicit TestRend(uint32_t seed) { init(seed); } in TestRend() argument
50 void init(uint32_t seed);
51 uint32_t next(uint32_t seed);
H A Dtest_common.cpp33 uint32_t TestRend::next(uint32_t seed) in next() argument
35 return TMUL*seed + TADD; in next()
38 void TestRend::init(uint32_t seed) in init() argument
40 a = next(seed); in init()
/ohos5.0/docs/en/application-dev/security/CryptoArchitectureKit/
H A Dcrypto-generate-random-number.md15 - Generate a series of random sequences based on a seed.
25 - Random seed
29 …usly. Therefore, the generated random number sequences are different even if the same seed is used.
45 …apis-crypto-architecture-kit/js-apis-cryptoFramework.md#setseed) to set a seed for the random numb…
57 let seed = new Uint8Array([1, 2, 3]);
58 rand.setSeed({ data: seed });
/ohos5.0/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/iso_task_common/
H A Diso_task_common.c328 if (params->seed.val != NULL) { in DestroyIsoParams()
329 HcFree(params->seed.val); in DestroyIsoParams()
330 params->seed.val = NULL; in DestroyIsoParams()
474 params->seed.val = (uint8_t *)HcMalloc(SEED_LEN, 0); in AllocSeed()
475 if (params->seed.val == NULL) { in AllocSeed()
479 params->seed.length = SEED_LEN; in AllocSeed()
571 static int AuthGeneratePsk(const Uint8Buff *seed, IsoParams *params) in AuthGeneratePsk() argument
610 return params->baseParams.loader->computeHmac(&keyParams, seed, &pskBuf); in AuthGeneratePskUsePin()
636 if (GetByteFromJson(in, FIELD_SEED, params->seed.val, params->seed.length) != 0) { in GeneratePsk()
643 res = AuthGeneratePsk(&params->seed, params); in GeneratePsk()
[all …]
/ohos5.0/base/security/crypto_framework/frameworks/crypto_operation/
H A Drand.c94 static HcfResult SetSeed(HcfRand *self, HcfBlob *seed) in SetSeed() argument
96 if ((self == NULL) || (!HcfIsBlobValid(seed)) || (seed->len > INT_MAX)) { in SetSeed()
105 ((HcfRandImpl *)self)->spiObj, seed); in SetSeed()
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/targets/
H A Dplatform_adapter.cpp75 void Srand(unsigned seed) in Srand() argument
78 srand(seed); in Srand()
/ohos5.0/foundation/multimodalinput/input/util/common/include/
H A Did_factory.h29 explicit IdFactory(T seed) : seed_(seed) {} in IdFactory() argument
/ohos5.0/base/msdp/device_status/utils/common/include/
H A Did_factory.h30 explicit IdFactory(T seed) : seed_(seed) {} in IdFactory() argument
/ohos5.0/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/utility/
H A Dapp_event_stat.cpp32 std::random_device seed; in RandomNum() local
33 std::mt19937_64 gen(seed()); in RandomNum()
/ohos5.0/docs/en/application-dev/application-test/
H A Dwukong-guidelines.md11 …ell startup, device application startup, multiple injection modes, random seed setting, focus comp…
21 …om** function to generate a sequence of random numbers with the specified seed value to generate a…
107 -s, --seed random seed
148 | -s,--seed | Sets the random seed. | No | If the same random seed is…
182 | -s | 10 | Sets the random seed. The seed value is **10**. |
246 | -s,--seed | Sets the random seed. | No | If the same random seed is…
276 | -s | 10 | Sets the random seed. The seed value is **10**. |
/ohos5.0/base/security/crypto_framework/frameworks/cj/src/
H A Drandom_impl.cpp57 void RandomImpl::SetSeed(HcfBlob *seed, int32_t* errCode) in SetSeed() argument
64 HcfResult res = randObj_->setSeed(randObj_, seed); in SetSeed()
/ohos5.0/drivers/hdf_core/framework/utils/src/
H A Dhdf_cstring.c19 const uint32_t seed = 131; // 31 131 1313 13131 131313 etc.. in HdfStringMakeHashKey() local
21 hashValue = hashValue * seed + (*key++); in HdfStringMakeHashKey()
/ohos5.0/foundation/graphic/graphic_3d/lume/LumeRender/src/vulkan/
H A Dnode_context_pool_manager_vk.cpp50 uint64_t seed = 0; in hash() local
51 …HashRange(seed, subpass.inputAttachmentIndices, subpass.inputAttachmentIndices + subpass.inputAtta… in hash()
52 …HashRange(seed, subpass.colorAttachmentIndices, subpass.colorAttachmentIndices + subpass.colorAtta… in hash()
54seed, subpass.resolveAttachmentIndices, subpass.resolveAttachmentIndices + subpass.resolveAttachme… in hash()
56 HashCombine(seed, static_cast<uint64_t>(subpass.depthAttachmentIndex)); in hash()
59 HashCombine(seed, subpass.viewMask); in hash()
61 return seed; in hash()
H A Dgpu_memory_allocator_vk.cpp84 uint64_t seed = importantEngineCreationFlags; in hash() local
85 …HashCombine(seed, static_cast<uint64_t>(desc.usageFlags), static_cast<uint64_t>(desc.memoryPropert… in hash()
86 return seed; in hash()
96 uint64_t seed = importantImageUsageFlags; in hash() local
97 …HashCombine(seed, static_cast<uint64_t>(desc.imageType), static_cast<uint64_t>(desc.memoryProperty… in hash()
98 return seed; in hash()
/ohos5.0/docs/zh-cn/application-dev/security/CryptoArchitectureKit/
H A Dcrypto-generate-random-number.md57 let seed = new Uint8Array([1, 2, 3]);
58 rand.setSeed({ data: seed });
/ohos5.0/commonlibrary/rust/ylong_json/src/
H A Ddeserializer.rs662 fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Error> in next_element_seed()
695 Some(_) => Ok(Some(seed.deserialize(&mut *self.deserializer)?)), in next_element_seed()
707 fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Error> in next_key_seed()
735 Some(b'"') => Ok(Some(seed.deserialize(&mut *self.deserializer)?)), in next_key_seed()
748 fn next_value_seed<V>(&mut self, seed: V) -> Result<V::Value, Error> in next_value_seed()
756 seed.deserialize(&mut *self.deserializer) in next_value_seed()
793 fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self::Variant), Self::Error> in variant_seed()
797 let value = seed.deserialize(&mut *self.deserializer)?; in variant_seed()
819 fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value, Self::Error> in newtype_variant_seed()
823 seed.deserialize(self.deserializer) in newtype_variant_seed()
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/render_service_client/test/
H A Drender_service_client_scale_demo.cpp43 static std::random_device seed; in GetRandomScale() local
44 std::mt19937_64 gen(seed()); in GetRandomScale()

123