MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CLProgram

Class CLProgram

tensorflow/lite/delegates/gpu/cl/cl_program.h:44–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 const std::vector<CompilerOptions>& compiler_options);
43
44class CLProgram {
45 public:
46 CLProgram() {}
47 CLProgram(cl_program program, cl_device_id device_id);
48
49 // Move only
50 CLProgram(CLProgram&& program);
51 CLProgram& operator=(CLProgram&& program);
52 CLProgram(const CLProgram&) = delete;
53 CLProgram& operator=(const CLProgram&) = delete;
54
55 ~CLProgram();
56
57 cl_program program() const { return program_; }
58
59 // Return the cl_device_id associated with the program object.
60 // This can be the device associated with context on which the program object
61 // has been created or can be device that was specified when a progam object
62 // was created using clCreateProgramWithBinary.
63 cl_device_id GetDeviceId() const { return device_id_; }
64
65 Status GetBinary(std::vector<uint8_t>* result) const;
66
67 private:
68 void Release();
69
70 cl_program program_ = nullptr;
71
72 // reference
73 cl_device_id device_id_ = nullptr;
74};
75
76Status CreateCLProgram(const std::string& code,
77 const std::string& compiler_options,

Callers 2

CreateCLProgramFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected