breadlicker45/gpuGAN
0
1// Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.2//3// NVIDIA CORPORATION and its licensors retain all intellectual property4// and proprietary rights in and to this software, related documentation5// and any modifications thereto. Any use, reproduction, disclosure or6// distribution of this software and related documentation without an express7// license agreement from NVIDIA CORPORATION is strictly prohibited.8 9//------------------------------------------------------------------------10// CUDA kernel parameters.11 12struct bias_act_kernel_params13{14 const void* x; // [sizeX]15 const void* b; // [sizeB] or NULL16 const void* xref; // [sizeX] or NULL17 const void* yref; // [sizeX] or NULL18 const void* dy; // [sizeX] or NULL19 void* y; // [sizeX]20 21 int grad;22 int act;23 float alpha;24 float gain;25 float clamp;26 27 int sizeX;28 int sizeB;29 int stepB;30 int loopX;31};32 33//------------------------------------------------------------------------34// CUDA kernel selection.35 36template <class T> void* choose_bias_act_kernel(const bias_act_kernel_params& p);37 38//------------------------------------------------------------------------39 