35#ifndef __NEKO_CUDA_RAMP_MAPPING_KERNELS__
36#define __NEKO_CUDA_RAMP_MAPPING_KERNELS__
49 for (
int i =
idx; i < n; i +=
str) {
51 + (f_max - f_min) *
X_in_d[i] / (1.0 + q * (1.0 +
X_in_d[i]));
66 for (
int i =
idx; i < n; i +=
str) {
67 dF_dX_in_d[i] = (f_max - f_min) * (q + 1.0) / (
68 (1.0 - q * (
X_in_d[i] - 1.0)) * (1.0 - q * (
X_in_d[i] - 1.0))
83 for (
int i =
idx; i < n; i +=
str) {
85 + (f_max - f_min) *
X_in_d[i] * (1.0 + q) / (
X_in_d[i] + q);
100 for (
int i =
idx; i < n; i +=
str) {
__global__ void convex_down_RAMP_mapping_apply_backward_kernel(const T f_min, const T f_max, const T q, T *__restrict__ dF_dX_in_d, T *__restrict__ dF_dX_out_d, T *__restrict__ X_in_d, const int n)
__global__ void convex_down_RAMP_mapping_apply_kernel(const T f_min, const T f_max, const T q, T *__restrict__ X_out_d, T *__restrict__ X_in_d, const int n)
__global__ void convex_up_RAMP_mapping_apply_kernel(const T f_min, const T f_max, const T q, T *__restrict__ X_out_d, T *__restrict__ X_in_d, const int n)
__global__ void convex_up_RAMP_mapping_apply_backward_kernel(const T f_min, const T f_max, const T q, T *__restrict__ dF_dX_in_d, T *__restrict__ dF_dX_out_d, T *__restrict__ X_in_d, const int n)