Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/workflows/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ jobs:
cuda: "13.0.2"
gcc: 13
config: Debug
- os: ubuntu-24.04
cuda: "12.6.0"
gcc: 13
config: Release
- os: ubuntu-24.04
cuda: "12.6.0"
gcc: 13
Expand All @@ -56,12 +52,6 @@ jobs:
method: 'network'
log-file-suffix: '${{matrix.os}}-gcc${{matrix.gcc}}-config${{matrix.config}}.txt'

# - name: Install CUDA
# env:
# cuda: ${{ matrix.cuda }}
# run: ./.github/action-scripts/install_cuda_ubuntu.sh
# shell: bash

# Specify the correct host compilers
- name: Install/Select gcc and g++
run: |
Expand Down
15 changes: 4 additions & 11 deletions samples/s06_anyTriangleWithinRadius/anyTriangleWithinRadius.cu
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ void d_computeVolume(float *d_result,
vec3i *d_indices,
vec3f *d_vertices,
box3f worldBounds,
bvh3f bvh,
/*! if true, we only check the bounding boxes of
triangles, not actual box-triangle tests */
bool checkOnlyBoundingBoxes)
bvh3f bvh)
{
int ix = threadIdx.x+blockIdx.x*blockDim.x; if (ix >= dims.x) return;
int iy = threadIdx.y+blockIdx.y*blockDim.y; if (iy >= dims.y) return;
Expand Down Expand Up @@ -93,8 +90,7 @@ cuBQL::bvh3f buildBVH(int numTriangles,
std::vector<float> computeVolume(const std::vector<vec3i> &indices,
const std::vector<vec3f> &vertices,
vec3i dims,
box3f worldBounds,
bool checkOnlyBoundingBoxes)
box3f worldBounds)
{
int numCells = dims.x*dims.y*dims.z;
std::vector<float> result(numCells);
Expand All @@ -110,7 +106,7 @@ std::vector<float> computeVolume(const std::vector<vec3i> &indices,
vec3i nb = divRoundUp(dims,bs);
d_computeVolume<<<(dim3)nb,(dim3)bs>>>(d_result,dims,d_indices,d_vertices,
worldBounds,
bvh,checkOnlyBoundingBoxes);
bvh);

cuBQL::cuda::free(bvh);

Expand All @@ -132,16 +128,13 @@ int main(int ac, char **av)
{
std::string inFileName = "";
std::string outFilePrefix = "";
bool checkOnlyBoundingBoxes = false;
int n = 256;
for (int i=1;i<ac;i++) {
const std::string arg = av[i];
if (arg[0] != '-')
inFileName = arg;
else if (arg == "-o")
outFilePrefix = av[++i];
else if (arg == "-bo" || arg == "--boxes-only")
checkOnlyBoundingBoxes = true;
else if (arg == "-n")
n = std::stoi(av[++i]);
else
Expand All @@ -167,7 +160,7 @@ int main(int ac, char **av)
std::cout << "using volume dims of " << dims << std::endl;

std::vector<float> result
= computeVolume(indices,vertices,dims,bb,checkOnlyBoundingBoxes);
= computeVolume(indices,vertices,dims,bb);
const std::string outFileName =
outFilePrefix
+"_"+std::to_string(dims.x)
Expand Down