11019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. 21019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlowerLicensed under the Apache License, Version 2.0 (the "License"); 31019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFloweryou may not use this file except in compliance with the License. 41019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlowerYou may obtain a copy of the License at 51019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower 61019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower http://www.apache.org/licenses/LICENSE-2.0 71019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower 81019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlowerUnless required by applicable law or agreed to in writing, software 91019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlowerdistributed under the License is distributed on an "AS IS" BASIS, 101019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlowerWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 111019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlowerSee the License for the specific language governing permissions and 121019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlowerlimitations under the License. 131019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower==============================================================================*/ 141019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower 151019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower#if GOOGLE_CUDA 161019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower 171019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower#define EIGEN_USE_GPU 181019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower 191019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower#include "tensorflow/core/kernels/adjust_hsv_gpu.cu.h" 201019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower#include "tensorflow/core/kernels/adjust_saturation_op.h" 211019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower#include "tensorflow/core/util/cuda_kernel_helper.h" 221019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower 231019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlowernamespace tensorflow { 241019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower 251019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlowernamespace functor { 261019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower 271019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlowervoid AdjustSaturationGPU::operator()(GPUDevice* device, 281019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower const int64 number_of_elements, 291019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower const float* const input, 301019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower const float* const scale, 311019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower float* const output) { 321019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower const auto stream = device->stream(); 331019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower const CudaLaunchConfig config = 341019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower GetCudaLaunchConfig(number_of_elements, *device); 351019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower const int threads_per_block = config.thread_per_block; 361019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower const int block_count = 371019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower (number_of_elements + threads_per_block - 1) / threads_per_block; 381019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower internal::adjust_hsv_nhwc<false, true, false> 391019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower <<<block_count, threads_per_block, 0, stream>>>( 401019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower number_of_elements, input, output, nullptr, scale, nullptr); 411019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower} 421019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower} // namespace functor 431019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower} // namespace tensorflow 441019621df2b8e7f516be13de3fbb4fb2833a686aA. Unique TensorFlower#endif // GOOGLE_CUDA 45