Skip to content
Snippets Groups Projects
Commit 0440711e authored by Russel Arbore's avatar Russel Arbore
Browse files

progress

parent 5ab36921
No related branches found
No related tags found
1 merge request!195Misc. GPU improvements
Pipeline #201796 failed
This commit is part of merge request !195. Comments created here will be created in the context of that merge request.
...@@ -795,6 +795,26 @@ impl<'a, 'b> FunctionEdit<'a, 'b> { ...@@ -795,6 +795,26 @@ impl<'a, 'b> FunctionEdit<'a, 'b> {
self.add_constant(constant_to_construct) self.add_constant(constant_to_construct)
} }
pub fn add_pos_inf_constant(&mut self, id: TypeID) -> ConstantID {
let ty = self.get_type(id).clone();
let constant_to_construct = match ty {
Type::Float32 => Constant::Float32(ordered_float::OrderedFloat(f32::INFINITY)),
Type::Float64 => Constant::Float64(ordered_float::OrderedFloat(f64::INFINITY)),
_ => panic!(),
};
self.add_constant(constant_to_construct)
}
pub fn add_neg_inf_constant(&mut self, id: TypeID) -> ConstantID {
let ty = self.get_type(id).clone();
let constant_to_construct = match ty {
Type::Float32 => Constant::Float32(ordered_float::OrderedFloat(f32::NEG_INFINITY)),
Type::Float64 => Constant::Float64(ordered_float::OrderedFloat(f64::NEG_INFINITY)),
_ => panic!(),
};
self.add_constant(constant_to_construct)
}
pub fn get_constant(&self, id: ConstantID) -> impl Deref<Target = Constant> + '_ { pub fn get_constant(&self, id: ConstantID) -> impl Deref<Target = Constant> + '_ {
if id.idx() < self.editor.constants.borrow().len() { if id.idx() < self.editor.constants.borrow().len() {
Either::Left(Ref::map(self.editor.constants.borrow(), |constants| { Either::Left(Ref::map(self.editor.constants.borrow(), |constants| {
......
...@@ -62,10 +62,17 @@ fixpoint { ...@@ -62,10 +62,17 @@ fixpoint {
simpl!(max_gradient); simpl!(max_gradient);
fork-dim-merge(max_gradient); fork-dim-merge(max_gradient);
simpl!(max_gradient); simpl!(max_gradient);
fork-tile[32, 0, false, true](max_gradient); fork-tile[1024, 0, false, true](max_gradient);
let out = fork-split(max_gradient);
fork-tile[32, 0, false, true](out._4_max_gradient.fj1);
let out = fork-split(max_gradient);
simpl!(max_gradient); simpl!(max_gradient);
fork-split(max_gradient); xdot[true](max_gradient);
clean-monoid-reduces(max_gradient);
xdot[true](max_gradient);
fork-fission-bufferize[out._4_max_gradient.fj0, out._4_max_gradient.fj1](max_gradient);
simpl!(max_gradient); simpl!(max_gradient);
xdot[true](max_gradient);
no-memset(reject_zero_crossings@res); no-memset(reject_zero_crossings@res);
fixpoint { fixpoint {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment