Bug 89181 - cl::Program copy constructor bug
Summary: cl::Program copy constructor bug
Alias: None
Product: Beignet
Classification: Unclassified
Component: Beignet (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: low minor
Assignee: Zhigang Gong
QA Contact:
Depends on:
Reported: 2015-02-17 08:02 UTC by Paul Nagele
Modified: 2018-10-12 21:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Paul Nagele 2015-02-17 08:02:55 UTC
That works:

std::vector<cl::Program> program;
cl::Program tmp( context, source, &err );
tmp.build( devices, compileFlags );
program.push_back( tmp );

This does not:

std::vector<cl::Program> program;
cl::Program tmp( context, source, &err );
program.push_back( tmp );
program[0].build( devices, compileFlags );
Comment 1 Manasi 2015-10-22 22:27:47 UTC
While creating a vector of class objects, it is a good idea to allocate the object on heap and then push back as a pointer to the object.


std::vector<cl::Program*> program;
program.push_back(new cl::Program (context, source, &err));
program[0]->build(devices, compileFlags);
Comment 2 GitLab Migration User 2018-10-12 21:23:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/beignet/beignet/issues/18.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.