Deepity
Ultra-fast, SIMD-accelerated Predictive Coding
Loading...
Searching...
No Matches
Linear.h
Go to the documentation of this file.
1#pragma once
2#include <algorithm>
3#include <cstddef>
5
10
11namespace Deep
12{
16 static inline void linear([[maybe_unused]] float *x, [[maybe_unused]] size_t n) noexcept {}
17
19 static inline void dLinear(float *x, size_t n, [[maybe_unused]] bool activated = false) noexcept
20 {
21 std::fill(x, x + n, 1.0f);
22 }
23
27 static inline void dLinearInto(float *RESTRICT dst, [[maybe_unused]] const float *RESTRICT src, size_t n) noexcept
28 {
29 std::fill(dst, dst + n, 1.0f);
30 }
31} // namespace Deep
The RESTRICT portability macro shared by every activation header. Split out so each per-activation he...
#define RESTRICT
Portability macro for the C++ restrict pointer qualifier (MSVC spells it differently from everyone el...
Definition ActivationMacros.h:16
This file exists to provide both Tensor.h and IComputeBackend.h with device types without introducing...
Definition Backend.cpp:10
static void linear(float *, size_t) noexcept
See Linear.h.
static void dLinear(float *, size_t, bool) noexcept
See Linear.h.
static void dLinearInto(float *RESTRICT, const float *RESTRICT, size_t) noexcept
See Linear.h.