From 3f7e1bd5c5d4123ef6302c4015d20ba4bcc46237 Mon Sep 17 00:00:00 2001 From: Alessandro Bellina Date: Sun, 8 Dec 2024 13:50:03 -0800 Subject: [PATCH] clang format Signed-off-by: Alessandro Bellina --- java/src/main/native/src/RmmJni.cpp | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/java/src/main/native/src/RmmJni.cpp b/java/src/main/native/src/RmmJni.cpp index 1d319946f78..eac3377f1ab 100644 --- a/java/src/main/native/src/RmmJni.cpp +++ b/java/src/main/native/src/RmmJni.cpp @@ -772,27 +772,21 @@ JNIEXPORT void JNICALL Java_ai_rapids_cudf_Rmm_releaseArenaMemoryResource(JNIEnv CATCH_STD(env, ) } -JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_Rmm_newCudaAsyncMemoryResource(JNIEnv* env, - jclass clazz, - jlong init, - jlong release, - jboolean fabric) +JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_Rmm_newCudaAsyncMemoryResource( + JNIEnv* env, jclass clazz, jlong init, jlong release, jboolean fabric) { try { cudf::jni::auto_set_device(env); - - // when we are using fabric, we need to set the memory access to be + + // when we are using fabric, we need to set the memory access to be // read_write, in order for peer GPUs to have access to this memory. - auto [handle_type, prot_flag] = fabric ? - std::pair{ - rmm::mr::cuda_async_memory_resource::allocation_handle_type::fabric, - rmm::mr::cuda_async_memory_resource::access_flags::read_write} : - std::pair{ - rmm::mr::cuda_async_memory_resource::allocation_handle_type::none, - rmm::mr::cuda_async_memory_resource::access_flags::none}; - - auto ret = new rmm::mr::cuda_async_memory_resource( - init, release, handle_type, prot_flag); + auto [handle_type, prot_flag] = + fabric ? std::pair{rmm::mr::cuda_async_memory_resource::allocation_handle_type::fabric, + rmm::mr::cuda_async_memory_resource::access_flags::read_write} + : std::pair{rmm::mr::cuda_async_memory_resource::allocation_handle_type::none, + rmm::mr::cuda_async_memory_resource::access_flags::none}; + + auto ret = new rmm::mr::cuda_async_memory_resource(init, release, handle_type, prot_flag); return reinterpret_cast(ret); }