Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to fill array of custom user structures ? #857

Open
itmanager85 opened this issue Dec 20, 2020 · 0 comments
Open

how to fill array of custom user structures ? #857

itmanager85 opened this issue Dec 20, 2020 · 0 comments

Comments

@itmanager85
Copy link

itmanager85 commented Dec 20, 2020

for example needs something that,

`
struct Box {
float3 v0;
float3 v1;

	Box() {
		v0 = float3(M_INF, M_INF, M_INF);
		v1 = float3(-M_INF, -M_INF, -M_INF);
	}

};
__declspec(align(16))
struct Node {
int index;
int offset;
Box box;

	Node() {
		index = -1;
	}

};

boost::compute::vector<Node> nodes(10, context);

Node node_default;

boost::compute::fill(nodes.begin(), nodes.end(),
node_default, // compile error with that
queue);
`

how to fill array "nodes" with value "node_default" ?

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

No branches or pull requests

1 participant