mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-07 18:24:26 +00:00
28 lines
653 B
Plaintext
28 lines
653 B
Plaintext
#ifndef ACTIVATIONS_H
|
|
#define ACTIVATIONS_H
|
|
|
|
namespace Kernels {
|
|
|
|
/**
|
|
* @brief Sigmoid activation function kernel
|
|
*
|
|
* @param src Pointer to the source array
|
|
* @param dst Pointer to the destination array
|
|
* @param len Length of the arrays
|
|
*/
|
|
__global__ void
|
|
sigmoid(const float* __restrict__ src, float* __restrict__ dst, int len);
|
|
|
|
/**
|
|
* @brief Relu activation function kernel
|
|
*
|
|
* @param src Pointer to the source array
|
|
* @param dst Pointer to the destination array
|
|
* @param len Length of the arrays
|
|
*/
|
|
__global__ void
|
|
relu(const float* __restrict__ src, float* __restrict__ dst, int len);
|
|
|
|
} // namespace Kernels
|
|
|
|
#endif // ACTIVATIONS_H |