@@ -97,17 +97,17 @@ ur_result_t enqueueMemSetShadow(ur_context_handle_t Context,
9797 }
9898 }
9999
100- // context.logger.debug("urVirtualMemMap: {} ~ {}",
101- // (void *)MappedPtr,
102- // (void *)(MappedPtr + PageSize - 1));
100+ context.logger .debug (" urVirtualMemMap: {} ~ {}" ,
101+ (void *)MappedPtr,
102+ (void *)(MappedPtr + PageSize - 1 ));
103103
104104 // FIXME: No flag to check the failed reason is VA is already mapped
105105 auto URes = context.urDdiTable .VirtualMem .pfnMap (
106106 Context, (void *)MappedPtr, PageSize, PhysicalMem, 0 ,
107107 UR_VIRTUAL_MEM_ACCESS_FLAG_READ_WRITE);
108- // if (URes != UR_RESULT_SUCCESS) {
109- // context.logger.debug("urVirtualMemMap(): {}", URes);
110- // }
108+ if (URes != UR_RESULT_SUCCESS) {
109+ context.logger .debug (" urVirtualMemMap(): {}" , URes);
110+ }
111111
112112 // Initialize to zero
113113 if (URes == UR_RESULT_SUCCESS) {
@@ -173,7 +173,7 @@ SanitizerInterceptor::SanitizerInterceptor() {
173173 KV = Options->find (" detect_locals" );
174174 if (KV != Options->end ()) {
175175 auto Value = KV->second .front ();
176- cl_DetectLocals = Value == " 1" || Value == " true" ? 1 : 0 ;
176+ cl_DetectLocals = Value == " 1" || Value == " true" ? true : false ;
177177 }
178178}
179179
@@ -576,7 +576,7 @@ SanitizerInterceptor::insertContext(ur_context_handle_t Context,
576576
577577 CI = std::make_shared<ContextInfo>(Context);
578578
579- m_ContextMap.emplace (Context, CI );
579+ m_ContextMap.emplace (Context, std::move (CI) );
580580
581581 return UR_RESULT_SUCCESS;
582582}
@@ -612,7 +612,7 @@ SanitizerInterceptor::insertDevice(ur_device_handle_t Device,
612612 Device, UR_DEVICE_INFO_MEM_BASE_ADDR_ALIGN, sizeof (DI->Alignment ),
613613 &DI->Alignment , nullptr ));
614614
615- m_DeviceMap.emplace (Device, DI );
615+ m_DeviceMap.emplace (Device, std::move (DI) );
616616
617617 return UR_RESULT_SUCCESS;
618618}
0 commit comments