boostorg / boostorg/compute

how to fill array of custom user structures ?

Open
#857 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.7k
Forks
340
PR merge metrics
No merged PRs in 30d

Description

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 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" ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.