-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/solver: implement solver and sgd
Set up structure for solvers; Documentation is still lacking
- Loading branch information
Showing
10 changed files
with
408 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
use rblas::Axpy; | ||
use rblas::Dot; | ||
use rblas::*; | ||
|
||
pub fn leaf_cpu_axpy(alpha: &f32, x: &[f32], y: &mut Vec<f32>) { | ||
Axpy::axpy(alpha, x, y); | ||
} | ||
|
||
pub fn leaf_cpu_axpby(alpha: &f32, x: &[f32], beta: &f32, y: &mut Vec<f32>) { | ||
leaf_cpu_scal(beta, y); | ||
leaf_cpu_axpy(alpha, x, y); | ||
} | ||
|
||
pub fn leaf_cpu_dot(x: &[f32], y: &[f32]) -> f32 { | ||
Dot::dot(x, y) | ||
} | ||
|
||
pub fn leaf_cpu_axpy(alpha: &f32, x: &[f32], y: &mut Vec<f32>) { | ||
Axpy::axpy(alpha, x, y); | ||
pub fn leaf_cpu_scal(alpha: &f32, x: &mut Vec<f32>) { | ||
Scal::scal(alpha, x) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.