Skip to content

Commit 1b25904

Browse files
committed
addressed
1 parent 82f0fd1 commit 1b25904

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

crates/optix/src/acceleration.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,15 +702,13 @@ bitflags::bitflags! {
702702
/// Select which operation to perform with [`accel_build()`].
703703
#[cfg_attr(windows, repr(i32))]
704704
#[cfg_attr(unix, repr(u32))]
705-
#[derive(Debug, Copy, Clone, PartialEq)]
706-
#[derive(Default)]
705+
#[derive(Debug, Copy, Clone, PartialEq, Default)]
707706
pub enum BuildOperation {
708707
#[default]
709708
Build = sys::OptixBuildOperation_OPTIX_BUILD_OPERATION_BUILD,
710709
Update = sys::OptixBuildOperation_OPTIX_BUILD_OPERATION_UPDATE,
711710
}
712711

713-
714712
/// Configure how to handle ray times that are outside of the provided motion keys.
715713
///
716714
/// By default, the object will appear static (clamped) to the nearest motion

crates/optix/src/pipeline.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ pub struct Module {
134134
/// Module compilation optimization level
135135
#[cfg_attr(windows, repr(i32))]
136136
#[cfg_attr(unix, repr(u32))]
137-
#[derive(Debug, Hash, PartialEq, Copy, Clone)]
138-
#[derive(Default)]
137+
#[derive(Debug, Hash, PartialEq, Copy, Clone, Default)]
139138
pub enum CompileOptimizationLevel {
140139
#[default]
141140
Default = sys::OptixCompileOptimizationLevel::OPTIX_COMPILE_OPTIMIZATION_DEFAULT,
@@ -145,20 +144,17 @@ pub enum CompileOptimizationLevel {
145144
Level3 = sys::OptixCompileOptimizationLevel::OPTIX_COMPILE_OPTIMIZATION_LEVEL_3,
146145
}
147146

148-
149147
/// Module compilation debug level
150148
#[cfg_attr(windows, repr(i32))]
151149
#[cfg_attr(unix, repr(u32))]
152-
#[derive(Debug, Hash, PartialEq, Copy, Clone)]
153-
#[derive(Default)]
150+
#[derive(Debug, Hash, PartialEq, Copy, Clone, Default)]
154151
pub enum CompileDebugLevel {
155152
#[default]
156153
None = sys::OptixCompileDebugLevel::OPTIX_COMPILE_DEBUG_LEVEL_NONE,
157154
LineInfo = sys::OptixCompileDebugLevel::OPTIX_COMPILE_DEBUG_LEVEL_LINEINFO,
158155
Full = sys::OptixCompileDebugLevel::OPTIX_COMPILE_DEBUG_LEVEL_FULL,
159156
}
160157

161-
162158
cfg_if::cfg_if! {
163159
if #[cfg(any(feature="optix72", feature="optix73"))] {
164160
#[repr(C)]

crates/rustc_codegen_nvvm/src/nvvm.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,14 @@ pub fn codegen_bitcode_modules(
155155
/// linked when building the nvvm program.
156156
pub fn find_libdevice() -> Option<Vec<u8>> {
157157
if let Some(base_path) = find_cuda_root() {
158-
let libdevice_dir = Path::new(&base_path).join("nvvm").join("libdevice");
159-
println!("Checking libdevice directory: {:?}", libdevice_dir);
160-
161-
let libdevice_file = fs::read_dir(&libdevice_dir)
158+
let libdevice_file = fs::read_dir(Path::new(&base_path).join("nvvm").join("libdevice"))
162159
.ok()?
163160
.filter_map(Result::ok)
164161
.find(|f| f.path().extension() == Some(OsStr::new("bc")))?
165162
.path();
166-
167-
println!("Found libdevice file: {:?}", libdevice_file);
168-
163+
169164
fs::read(libdevice_file).ok()
170165
} else {
171-
println!("CUDA root not found");
172166
None
173167
}
174168
}

0 commit comments

Comments
 (0)