mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-07 18:24:26 +00:00
Implement vector mean calculation
This commit is contained in:
@@ -59,4 +59,16 @@ void Utils::sum(float* d_vec, float* d_sum, const unsigned int length) {
|
||||
|
||||
remaining = blocks_needed;
|
||||
}
|
||||
}
|
||||
|
||||
void Utils::mean(float* d_vec, float* d_mean, const unsigned int length) {
|
||||
float sum;
|
||||
Utils::sum(d_vec, &sum, length);
|
||||
*d_mean = sum / length;
|
||||
}
|
||||
|
||||
void Utils::var(float* d_vec, float* d_mean, float* d_var, const unsigned int length) {
|
||||
|
||||
// TODO:
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user