I have a question regarding how I should set the PAGE_LOCKED when allocate HostMem inside a C++ class object.
First I was made test program to test declare a cv::cuda::HostMem like this in my
main()
{
...
cv::cuda::HostMem my_test(cv::cuda::HostMem::PAGE_LOCKED);
my_host_mem.create(ROWS, COLS, CV_32FC3);
...
}
That’s seems to be right in my eyes
But when I want to do similar thing inside a class
class my_gpu_class
{
...
cv::cuda::HostMem my_host_mem;
void init_my_obj(void);
...
}
void my_gpu_class::init_my_obj(void)
{
my_host_mem.getAllocator(cv::cuda::HostMem::PAGE_LOCKED);// will this set my_host_mem = PAGE_LOCKED ?
my_host_mem.create(ROWS, COLS, CV_32FC3);
}
Both cases was complied OK but dose the
my_host_mem
get PAGE_LOCKED in both of this cases ??
Best Regards
Olle Welin
olle_welin@hotmail.com