Skip to content

Conversation

@FujiZ
Copy link
Contributor

@FujiZ FujiZ commented Aug 18, 2024

  1. implement generic builder for both cq and cq_ex
  2. implement comp_channel and associate its lifetime with cq

1. implement generic builder for both cq and cq_ex
2. implement comp_channel and associate its lifetime with cq
@FujiZ
Copy link
Contributor Author

FujiZ commented Aug 18, 2024

Maybe we can put CompletionQueue and CompletionChannel together in a single module called completion.

@FujiZ FujiZ requested a review from dragonJACson August 18, 2024 09:12
@dragonJACson
Copy link
Contributor

Maybe we can put CompletionQueue and CompletionChannel together in a single module called completion.

I agree, as CompletionChannel would only be a part of CompletionQueue? So both of them and some other attributes related with CQ should be in a single module

let ctx = device.open().unwrap();

let comp_channel = comp_channel::CompletionChannel::new(&ctx).unwrap();
let mut builder = completion_queue::CompletionQueueBuilder::new(&ctx);
Copy link
Contributor

@dragonJACson dragonJACson Aug 18, 2024

Choose a reason for hiding this comment

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

What about using ctx.create_comp_channel and ctx.create_cq_builder? So that we don't need to pass the argument explicitly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah we can add some methods at context level to invoke these implementations.

@FujiZ FujiZ merged commit e3da584 into main Aug 18, 2024
@FujiZ FujiZ deleted the dev/comp branch August 18, 2024 14:45
@FujiZ
Copy link
Contributor Author

FujiZ commented Sep 1, 2024

Ref #8

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.

3 participants