Skip to content

Commit 54a8339

Browse files
committed
formatting
Signed-off-by: Karan Janthe <[email protected]>
1 parent 8777369 commit 54a8339

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub(crate) mod Enzyme_AD {
9595
pub(crate) fn EnzymeSetCLBool(arg1: *mut ::std::os::raw::c_void, arg2: u8);
9696
pub(crate) fn EnzymeSetCLString(arg1: *mut ::std::os::raw::c_void, arg2: *const c_char);
9797
}
98-
98+
9999
// TypeTree functions
100100
unsafe extern "C" {
101101
pub(crate) fn EnzymeNewTypeTree() -> CTypeTreeRef;
@@ -115,7 +115,7 @@ pub(crate) mod Enzyme_AD {
115115
pub(crate) fn EnzymeTypeTreeToString(arg1: CTypeTreeRef) -> *const c_char;
116116
pub(crate) fn EnzymeTypeTreeToStringFree(arg1: *const c_char);
117117
}
118-
118+
119119
unsafe extern "C" {
120120
static mut EnzymePrintPerf: c_void;
121121
static mut EnzymePrintActivity: c_void;
@@ -184,39 +184,40 @@ pub(crate) use self::Fallback_AD::*;
184184
#[cfg(not(llvm_enzyme))]
185185
pub(crate) mod Fallback_AD {
186186
#![allow(unused_variables)]
187-
188-
use super::{CConcreteType, CTypeTreeRef, Context};
187+
189188
use libc::c_char;
190189

190+
use super::{CConcreteType, CTypeTreeRef, Context};
191+
191192
// TypeTree function fallbacks
192193
pub(crate) fn EnzymeNewTypeTree() -> CTypeTreeRef {
193194
unimplemented!()
194195
}
195-
196+
196197
pub(crate) fn EnzymeNewTypeTreeCT(arg1: CConcreteType, ctx: &Context) -> CTypeTreeRef {
197198
unimplemented!()
198199
}
199-
200+
200201
pub(crate) fn EnzymeNewTypeTreeTR(arg1: CTypeTreeRef) -> CTypeTreeRef {
201202
unimplemented!()
202203
}
203-
204+
204205
pub(crate) fn EnzymeFreeTypeTree(CTT: CTypeTreeRef) {
205206
unimplemented!()
206207
}
207-
208+
208209
pub(crate) fn EnzymeMergeTypeTree(arg1: CTypeTreeRef, arg2: CTypeTreeRef) -> bool {
209210
unimplemented!()
210211
}
211-
212+
212213
pub(crate) fn EnzymeTypeTreeOnlyEq(arg1: CTypeTreeRef, pos: i64) {
213214
unimplemented!()
214215
}
215-
216+
216217
pub(crate) fn EnzymeTypeTreeData0Eq(arg1: CTypeTreeRef) {
217218
unimplemented!()
218219
}
219-
220+
220221
pub(crate) fn EnzymeTypeTreeShiftIndiciesEq(
221222
arg1: CTypeTreeRef,
222223
data_layout: *const c_char,
@@ -226,11 +227,11 @@ pub(crate) mod Fallback_AD {
226227
) {
227228
unimplemented!()
228229
}
229-
230+
230231
pub(crate) fn EnzymeTypeTreeToString(arg1: CTypeTreeRef) -> *const c_char {
231232
unimplemented!()
232233
}
233-
234+
234235
pub(crate) fn EnzymeTypeTreeToStringFree(arg1: *const c_char) {
235236
unimplemented!()
236237
}

tests/run-make/autodiff/type-trees/type-analysis/memcpy/memcpy.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ use std::ptr;
77
#[no_mangle]
88
fn test_memcpy(input: &[f64; 8]) -> f64 {
99
let mut local_data = [0.0f64; 8];
10-
10+
1111
unsafe {
1212
ptr::copy_nonoverlapping(input.as_ptr(), local_data.as_mut_ptr(), 8);
1313
}
14-
14+
1515
let mut result = 0.0;
1616
for i in 0..8 {
1717
result += local_data[i] * local_data[i];
1818
}
19-
19+
2020
result
2121
}
2222

@@ -25,7 +25,7 @@ fn main() {
2525
let mut d_input = [0.0; 8];
2626
let result = test_memcpy(&input);
2727
let result_d = d_test_memcpy(&input, &mut d_input, 1.0);
28-
28+
2929
assert_eq!(result, result_d);
3030
println!("Memcpy test passed: result = {}", result);
31-
}
31+
}

tests/run-make/autodiff/type-trees/type-analysis/memcpy/rmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ fn main() {
2525

2626
// Run FileCheck on the stdout using the check file
2727
llvm_filecheck().patterns("memcpy.check").stdin_buf(rfs::read("memcpy.stdout")).run();
28-
}
28+
}

0 commit comments

Comments
 (0)