MCPcopy Create free account
hub / github.com/clMathLibraries/clFFT / writeKernel

Method writeKernel

src/library/enqueue.cpp:672–692  ·  view source on GitHub ↗

Read the kernels that this plan uses from file, and store into the plan

Source from the content-addressed store, hash-verified

670
671// Read the kernels that this plan uses from file, and store into the plan
672clfftStatus FFTAction::writeKernel( const clfftPlanHandle plHandle, const clfftGenerators gen, const FFTKernelSignatureHeader* data, const cl_context& context, const cl_device_id &device )
673{
674 FFTRepo& fftRepo = FFTRepo::getInstance( );
675
676 std::string kernelPath = getKernelName(gen, plHandle, true);
677
678 // Logic to write string contents out to file
679 tofstreamRAII< std::ofstream, std::string > kernelFile( kernelPath.c_str( ) );
680 if( !kernelFile.get( ) )
681 {
682 std::cerr << "Failed to open kernel file for writing: " << kernelPath.c_str( ) << std::endl;
683 return CLFFT_FILE_CREATE_FAILURE;
684 }
685
686 std::string kernel;
687 OPENCL_V( fftRepo.getProgramCode( gen, data, kernel, device, context ), _T( "fftRepo.getProgramCode failed." ) );
688
689 kernelFile.get( ) << kernel << std::endl;
690
691 return CLFFT_SUCCESS;
692}
693
694
695// **************** TODO TODO TODO ***********************

Callers

nothing calls this directly

Calls 2

getKernelNameFunction · 0.85
getProgramCodeMethod · 0.80

Tested by

no test coverage detected