Skip to content

Conversation

@mlychkov
Copy link
Contributor

@mlychkov mlychkov commented Jun 1, 2020

FPGA device selectors use global constants of std::string type as
parameters in constructor. If some other inline global variable uses
fpga_device_selector in its constructor then there may be a situation
when FPGA device selector is initialized before global std::string
objects that it is depending on. Then it cannot find FPGA hw or
emulator devices because it has uninitialized platform name member.
Change type of constant strings with platform names to constant
C-string to guarantee initialization of FPGA device selector with
proper platform name.

FPGA device selectors use global constants of std::string type as
parameters in constructor. If some other inline global variable uses
fpga_device_selector in its constructor then there may be a situation
when FPGA device selector is initialized before global std::string
objects that it is depending on. Then it cannot find FPGA hw or
emulator devices because it has uninitialized platform name member.
Change type of constant strings with platform names to constant
C-string to guarantee initialization of FPGA device selector with
proper platform name.
@mlychkov mlychkov requested review from alexbatashev and domiyan June 1, 2020 17:00
@mlychkov mlychkov requested review from a team and MrSidims as code owners June 1, 2020 17:00
alexbatashev
alexbatashev previously approved these changes Jun 1, 2020
MrSidims
MrSidims previously approved these changes Jun 1, 2020
Copy link
Contributor

@MrSidims MrSidims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mlychkov mlychkov dismissed stale reviews from MrSidims and alexbatashev via 6b6e1b6 June 1, 2020 19:15
@mlychkov mlychkov removed the request for review from domiyan June 2, 2020 06:27
@bader bader merged commit 357e9c8 into intel:sycl Jun 3, 2020
@mlychkov mlychkov deleted the private/mlychkov/fix_global_initialization_of_fpga_device_selector branch June 9, 2020 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants