| 109 | } |
| 110 | |
| 111 | clfftStatus FFTRepo::setProgramCode( const clfftGenerators gen, const FFTKernelSignatureHeader * data, const std::string& kernel, const cl_device_id &device, const cl_context& planContext ) |
| 112 | { |
| 113 | scopedLock sLock( lockRepo, _T( "setProgramCode" ) ); |
| 114 | |
| 115 | FFTRepoKey key(gen, data, planContext, device); |
| 116 | |
| 117 | key.privatizeData(); |
| 118 | |
| 119 | // Prefix copyright statement at the top of generated kernels |
| 120 | std::stringstream ss; |
| 121 | ss << |
| 122 | "/* ************************************************************************\n" |
| 123 | " * Copyright 2013 Advanced Micro Devices, Inc.\n" |
| 124 | " *\n" |
| 125 | " * Licensed under the Apache License, Version 2.0 (the \"License\");\n" |
| 126 | " * you may not use this file except in compliance with the License.\n" |
| 127 | " * You may obtain a copy of the License at\n" |
| 128 | " *\n" |
| 129 | " * http://www.apache.org/licenses/LICENSE-2.0\n" |
| 130 | " *\n" |
| 131 | " * Unless required by applicable law or agreed to in writing, software\n" |
| 132 | " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" |
| 133 | " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" |
| 134 | " * See the License for the specific language governing permissions and\n" |
| 135 | " * limitations under the License.\n" |
| 136 | " * ************************************************************************/" |
| 137 | << std::endl << std::endl; |
| 138 | |
| 139 | std::string prefixCopyright = ss.str(); |
| 140 | |
| 141 | mapFFTs[ key ].ProgramString = prefixCopyright + kernel; |
| 142 | |
| 143 | return CLFFT_SUCCESS; |
| 144 | } |
| 145 | |
| 146 | clfftStatus FFTRepo::getProgramCode( const clfftGenerators gen, const FFTKernelSignatureHeader * data, std::string& kernel, const cl_device_id &device, const cl_context& planContext ) |
| 147 | { |
no test coverage detected