积极答复者
What is the difference between accelerator's default accelerator_view and the normal accelerator_view created by accelerator::create_view()

问题
-
I run the test case of amptests_1.2.0/Tests/3_device_Modeling/3_2_Accelerator/3_2_5_members/create_view/test.cpp,
The part code is:
runall_result result;
accelerator acc = Test::require_device();
accelerator_view av = acc.create_view();
result &= REPORT_RESULT((av != acc.get_default_view()) == true);Here i am not sure about the diference of av and acc.get_default_view().
答案
-
I run the test case of amptests_1.2.0/Tests/3_device_Modeling/3_2_Accelerator/3_2_5_members/create_view/test.cpp,
The part code is:
runall_result result;
accelerator acc = Test::require_device();
accelerator_view av = acc.create_view();
result &= REPORT_RESULT((av != acc.get_default_view()) == true);Here i am not sure about the diference of av and acc.get_default_view().
Hello,
Welcome to MSDN forum.
>>What is the difference between accelerator's default accelerator_view and the normal accelerator_view created by accelerator::create_view()
I think the difference between them is mainly about the queuing mode.Please take a look at the following information:
- The accelerator::create_view Method creates and returns an accelerator_view object on this accelerator, using the specified queuing mode. When the queuing mode is not specified, the new accelerator_view uses the queuing_mode::immediate queuing mode.
- The accelerator::get_default_view Method returns the default accelerator_view object that is associated with the accelerator.
Best Regards,
Jane.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 200005275 2014年2月18日 3:22
全部回复
-
I run the test case of amptests_1.2.0/Tests/3_device_Modeling/3_2_Accelerator/3_2_5_members/create_view/test.cpp,
The part code is:
runall_result result;
accelerator acc = Test::require_device();
accelerator_view av = acc.create_view();
result &= REPORT_RESULT((av != acc.get_default_view()) == true);Here i am not sure about the diference of av and acc.get_default_view().
Hello,
Welcome to MSDN forum.
>>What is the difference between accelerator's default accelerator_view and the normal accelerator_view created by accelerator::create_view()
I think the difference between them is mainly about the queuing mode.Please take a look at the following information:
- The accelerator::create_view Method creates and returns an accelerator_view object on this accelerator, using the specified queuing mode. When the queuing mode is not specified, the new accelerator_view uses the queuing_mode::immediate queuing mode.
- The accelerator::get_default_view Method returns the default accelerator_view object that is associated with the accelerator.
Best Regards,
Jane.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 200005275 2014年2月18日 3:22
-
Thanks for your help, i read CppAMPOpenSpecificationV12.pdf (line 912) and it said:
accelerator_view create_view();
Creates and returns a new accelerator view on the accelerator. Equivalent to “create_view(queuing_mode_automatic)”.
This puzzled me, now i believe accelerator_view create_view() creates and returns an accelerator_view object with the queuing_mode::immediate queuing mode.BUT, from accelerator::create_view Method, i saw
accelerator_view create_view( queuing_mode qmode = queuing_mode_automatic );
does it should declared as below?
accelerator_view create_view( queuing_mode qmode = queuing_mode_immediate );