Commit ca02014e authored by Nicolas Denoyelle's avatar Nicolas Denoyelle Committed by Swann Perarnau
Browse files

[feature] Add default cuda area to allocate unified memory.

parent 949a7717
Pipeline #12141 passed with stages
in 6 minutes and 3 seconds
......@@ -121,6 +121,11 @@ extern struct aml_area_ops aml_area_cuda_ops;
**/
extern struct aml_area aml_area_cuda;
/**
* Cuda area allocating unified memory.
**/
extern struct aml_area aml_area_cuda_unified;
/** Implementation of aml_area_data for cuda areas. **/
struct aml_area_cuda_data {
/** Area allocation flags. **/
......
......@@ -290,6 +290,11 @@ struct aml_area_cuda_data aml_area_cuda_data_default = {
.device = -1,
};
struct aml_area_cuda_data aml_area_cuda_data_unified = {
.flags = AML_AREA_CUDA_FLAG_ALLOC_UNIFIED,
.device = -1,
};
struct aml_area_ops aml_area_cuda_ops = {
.mmap = aml_area_cuda_mmap,
.munmap = aml_area_cuda_munmap,
......@@ -300,3 +305,7 @@ struct aml_area aml_area_cuda = {
.ops = &aml_area_cuda_ops,
.data = (struct aml_area_data *)(&aml_area_cuda_data_default)
};
struct aml_area aml_area_cuda_unified = {
.ops = &aml_area_cuda_ops,
.data = (struct aml_area_data *)(&aml_area_cuda_data_unified)};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment