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

Method buildProgramFromBinary

src/library/fft_binary_lookup.cpp:628–661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626
627
628cl_program FFTBinaryLookup::buildProgramFromBinary(const char * data,
629 size_t data_size,
630 cl_context context,
631 cl_device_id device,
632 cl_int & err,
633 const char * options)
634{
635 cl_program program = clCreateProgramWithBinary(context,
636 1, // num_device
637 &device, // device_list
638 &data_size, // lengths
639 (const unsigned char **)&data,
640 NULL,
641 &err);
642 if (err != CL_SUCCESS)
643 {
644 // FIXME: emit an internal message for OPENCL errors
645 return NULL;
646 }
647
648 err = clBuildProgram(program,
649 1, /* FIXME: 1 device */
650 &device,
651 options,
652 NULL,
653 NULL);
654
655 if (err != CL_SUCCESS)
656 {
657 return NULL;
658 }
659
660 return program;
661}
662
663cl_program FFTBinaryLookup::getProgram()
664{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected