@@ -41,8 +41,7 @@ void L0OptionsTy::processEnvironmentVars() {
4141 if (MemoryPoolVar.isPresent ()) {
4242 if (MemoryPoolVar.get () == " 0" ) {
4343 Flags.UseMemoryPool = 0 ;
44- std::for_each (MemPoolConfig.begin (), MemPoolConfig.end (),
45- [](auto &I) { I = {false , 0 , 0 , 0 }; });
44+ MemPoolConfig.fill ({false , 0 , 0 , 0 });
4645 } else {
4746 std::istringstream Str (MemoryPoolVar.get ());
4847 int32_t MemType = -1 ;
@@ -51,7 +50,7 @@ void L0OptionsTy::processEnvironmentVars() {
5150 const std::array<int32_t , 3 > DefaultValue{1 , 4 , 256 };
5251 const int32_t AllMemType = INT32_MAX;
5352 std::array<int32_t , 3 > AllInfo{1 , 4 , 256 };
54- std::array<std::array<int32_t , 3 >, 3 > PoolInfo;
53+ std::array<std::array<int32_t , 3 >, 3 > PoolInfo = {{{ 0 , 0 , 0 }}} ;
5554 for (std::string Token; std::getline (Str, Token, ' ,' ) && Valid > 0 ;) {
5655 if (Token == " device" ) {
5756 MemType = TARGET_ALLOC_DEVICE;
@@ -95,8 +94,7 @@ void L0OptionsTy::processEnvironmentVars() {
9594 MemPoolConfig[TARGET_ALLOC_SHARED] = {true , AllInfo[0 ], AllInfo[1 ],
9695 AllInfo[2 ]};
9796 } else {
98- std::for_each (MemPoolConfig.begin (), MemPoolConfig.end (),
99- [](auto &I) { I = {false , 0 , 0 , 0 }; });
97+ MemPoolConfig.fill ({false , 0 , 0 , 0 });
10098 }
10199 } else {
102100 for (size_t Pool = 0 ; Pool < PoolInfo.size (); ++Pool) {
0 commit comments