Skip to content

Commit

Permalink
Annotations corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
ggaspersic committed Oct 11, 2023
1 parent 10de3f8 commit 0fbbed8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/block_ffm.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#![allow(dead_code, unused_imports, unused_mut, invalid_value)]
#![allow(invalid_value, unused_mut)]

use core::arch::x86_64::*;
use rustc_hash::FxHashSet;
use std::any::Any;
use std::error::Error;
use std::mem::{self, MaybeUninit};
use std::ops::Bound::Included;
use std::sync::Mutex;
use std::time::Instant;
use std::{io, ptr};

use merand48::*;
Expand All @@ -28,7 +26,6 @@ use crate::regressor;
use crate::regressor::{BlockCache, FFM_CONTRA_BUF_LEN};

const FFM_STACK_BUF_LEN: usize = 131072;
const FFM_CONTRA_CACHE_BUF_LEN: usize = 1024;
const STEP: usize = 4;
const ZEROES: [f32; STEP] = [0.0; STEP];

Expand Down
8 changes: 7 additions & 1 deletion src/block_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ use std::io;
use std::io::Read;

use crate::feature_buffer;
use crate::graph;
use crate::optimizer::OptimizerSGD;
use crate::port_buffer;
use crate::regressor::{BlockCache, BlockTrait};
use std::cmp::min;
use std::mem;
use std::slice;

#[cfg(test)]
use crate::graph;

#[derive(Clone, Debug)]
#[repr(C)]
pub struct OptimizerData<L: OptimizerTrait> {
Expand Down Expand Up @@ -154,6 +156,7 @@ pub fn get_input_output_borrows(
}
}

#[cfg(test)]
pub fn slearn2(
bg: &mut graph::BlockGraph,
fb: &feature_buffer::FeatureBuffer,
Expand All @@ -167,6 +170,7 @@ pub fn slearn2(
pb.observations[0]
}

#[cfg(test)]
pub fn ssetup_cache2(
bg: &mut graph::BlockGraph,
cache_fb: &feature_buffer::FeatureBuffer,
Expand All @@ -183,6 +187,7 @@ pub fn ssetup_cache2(
);
}

#[cfg(test)]
pub fn spredict2_with_cache(
bg: &mut graph::BlockGraph,
fb: &feature_buffer::FeatureBuffer,
Expand All @@ -196,6 +201,7 @@ pub fn spredict2_with_cache(
pb.observations[0]
}

#[cfg(test)]
pub fn spredict2(
bg: &mut graph::BlockGraph,
fb: &feature_buffer::FeatureBuffer,
Expand Down

0 comments on commit 0fbbed8

Please sign in to comment.