Ask Your Question
1

Force UMat allocation on CPU?

asked 2016-02-22 06:06:40 -0600

strann gravatar image

updated 2016-02-22 06:07:18 -0600

Documentation states that

The actual UMat data can be located in a regular system memory, dedicated video memory, or shared memory.

Is it possible to force memory allocation on CPU rather that GPU? Can the dispatcher API handle it?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2016-02-22 11:10:59 -0600

matman gravatar image

This should do what you want.

#include <opencv2/core/ocl.hpp>

int main() {
    cv::ocl::setUseOpenCL(false);

    // do something on CPU only...

    return 0;
}
edit flag offensive delete link more

Comments

thank you! this works

strann gravatar imagestrann ( 2016-02-23 02:43:36 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-02-22 06:06:40 -0600

Seen: 556 times

Last updated: Feb 22 '16