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

Method populateCache

src/library/fft_binary_lookup.cpp:529–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527}
528
529cl_int FFTBinaryLookup::populateCache()
530{
531 // FIXME: support MSB
532 this->m_header.magic_key[0] = 'C';
533 this->m_header.magic_key[1] = 'L';
534 this->m_header.magic_key[2] = 'B';
535 this->m_header.magic_key[3] = '\0';
536
537 std::vector<unsigned char*> data;
538 cl_int err = getSingleBinaryFromProgram(this->m_program, data);
539
540 if (err != CL_SUCCESS)
541 {
542 return err;
543 }
544
545 this->m_header.header_size = sizeof(Header);
546 this->m_header.binary_size = data.size();
547 this->m_header.whole_file_size = this->m_header.header_size + this->m_header.binary_size + this->m_header.signature_size;
548
549 writeCacheFile(data); // ignore return code, because it does nothing if
550 // the file could not be written (i.e the current
551 // thread did not create the file
552 delete [] data[0];
553
554 return CL_SUCCESS;
555}
556
557cl_int FFTBinaryLookup::buildFromSource(const char * source)
558{

Callers 3

buildFromSourceMethod · 0.95
buildFromBinaryMethod · 0.95
compileKernelsMethod · 0.80

Calls 2

sizeMethod · 0.80

Tested by

no test coverage detected