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

Method buildProgramFromBinary

src/library/blas/generic/binary_lookup.cc:557–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555
556
557cl_program BinaryLookup::buildProgramFromBinary(const char * data,
558 size_t data_size,
559 cl_context context,
560 cl_device_id device,
561 cl_int & err,
562 const char * options)
563{
564 cl_program program = clCreateProgramWithBinary(context,
565 1, // num_device
566 &device, // device_list
567 &data_size, // lengths
568 (const unsigned char **)&data,
569 NULL,
570 &err);
571 if (err != CL_SUCCESS)
572 {
573 fprintf(stderr, "Warning: clCreateProgramWithBinary failed with code %d\n", err);
574 return NULL;
575 }
576
577 err = clBuildProgram(program,
578 1, /* FIXME: 1 device */
579 &device,
580 options,
581 NULL,
582 NULL);
583
584 if (err != CL_SUCCESS)
585 {
586 return NULL;
587 }
588
589 return program;
590}
591
592cl_program BinaryLookup::getProgram()
593{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected