Skip to content
Snippets Groups Projects

Refactor module

Merged Cyril Moineau requested to merge refactor_module into dev
28 files
+ 1750
470
Compare changes
  • Side-by-side
  • Inline
Files
28
@@ -9,7 +9,7 @@
template<typename Output_T, typename T,
typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>
__attribute__((always_inline)) inline
Output_T saturate (T value, int32_t sat)
Output_T saturate (T value, int32_t /*sat*/)
{
return value;
}
@@ -49,6 +49,10 @@ Output_T activation_forward_value (Sum_T weightedSum,
break;
}
// Value fixed here for now but it should be generated by
// the export module or determined by the type of Output_T
// For now only works for int8_t and uint8_t
const uint32_t NB_BITS = 8;
return saturate<Output_T>(rescaling(weightedSum, output), NB_BITS);
}
Loading