Skip to content

Commit

Permalink
[WIP] cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
freibold committed Nov 27, 2024
1 parent 246465c commit 506707d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 47 deletions.
16 changes: 3 additions & 13 deletions common/sys/alloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,11 @@ namespace embree
total_allocations++;

void* ptr = nullptr;
if (mode == EMBREE_USM_SHARED_DEVICE_READ_ONLY) {
std::cout << "XXX shared memory allocation!" << std::endl;
if (mode == EMBREE_USM_SHARED_DEVICE_READ_ONLY)
ptr = sycl::aligned_alloc_shared(align,size,*device,*context,sycl::ext::oneapi::property::usm::device_read_only());
}
else {
std::cout << "XXX shared memory allocation!" << std::endl;
else
ptr = sycl::aligned_alloc_shared(align,size,*device,*context);
}


if (size != 0 && ptr == nullptr)
throw std::bad_alloc();

Expand All @@ -118,15 +114,9 @@ namespace embree
void* ptr = nullptr;
if (type == EmbreeMemoryType::SHARED) {
if (mode == EMBREE_USM_SHARED_DEVICE_READ_ONLY)
{
std::cout << "XXX shared memory allocation!" << std::endl;
ptr = sycl::aligned_alloc_shared(align,size,*device,*context,sycl::ext::oneapi::property::usm::device_read_only());
}
else
{
std::cout << "XXX shared memory allocation!" << std::endl;
ptr = sycl::aligned_alloc_shared(align,size,*device,*context);
}
}
else if (type == EmbreeMemoryType::HOST) {
ptr = sycl::aligned_alloc_host(align,size,*context);
Expand Down
1 change: 0 additions & 1 deletion kernels/common/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ namespace embree
#if defined(EMBREE_SYCL_SUPPORT)
__forceinline void commit(sycl::queue queue) {
if (dptr == ptr) return;
std::cout << "buffer memcpy host to device" << std::endl;
queue.memcpy(dptr, ptr, numBytes);
}
#endif
Expand Down
66 changes: 33 additions & 33 deletions tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,40 +79,40 @@ IF (EMBREE_TUTORIALS_GLFW)
ENDIF()

ADD_SUBDIRECTORY(common)
#ADD_SUBDIRECTORY(embree_info)
#ADD_SUBDIRECTORY(minimal)
#ADD_SUBDIRECTORY(verify)
#ADD_SUBDIRECTORY(triangle_geometry)
#ADD_SUBDIRECTORY(dynamic_scene)
#ADD_SUBDIRECTORY(voronoi)
#ADD_SUBDIRECTORY(closest_point)
#ADD_SUBDIRECTORY(user_geometry)
#ADD_SUBDIRECTORY(viewer)
#ADD_SUBDIRECTORY(instanced_geometry)
#ADD_SUBDIRECTORY(multi_instanced_geometry)
#ADD_SUBDIRECTORY(intersection_filter)
#ADD_SUBDIRECTORY(pathtracer)
#ADD_SUBDIRECTORY(hair_geometry)
#ADD_SUBDIRECTORY(subdivision_geometry)
#ADD_SUBDIRECTORY(displacement_geometry)
#ADD_SUBDIRECTORY(grid_geometry)
#ADD_SUBDIRECTORY(bvh_builder)
#ADD_SUBDIRECTORY(lazy_geometry)
#ADD_SUBDIRECTORY(bvh_access)
#ADD_SUBDIRECTORY(quaternion_motion_blur)
#ADD_SUBDIRECTORY(motion_blur_geometry)
#ADD_SUBDIRECTORY(interpolation)
#ADD_SUBDIRECTORY(curve_geometry)
#ADD_SUBDIRECTORY(point_geometry)
#ADD_SUBDIRECTORY(buildbench)
#ADD_SUBDIRECTORY(convert)
#ADD_SUBDIRECTORY(collide)
#ADD_SUBDIRECTORY(next_hit)
#ADD_SUBDIRECTORY(multiscene_geometry)
#ADD_SUBDIRECTORY(ray_mask)
ADD_SUBDIRECTORY(embree_info)
ADD_SUBDIRECTORY(minimal)
ADD_SUBDIRECTORY(verify)
ADD_SUBDIRECTORY(triangle_geometry)
ADD_SUBDIRECTORY(dynamic_scene)
ADD_SUBDIRECTORY(voronoi)
ADD_SUBDIRECTORY(closest_point)
ADD_SUBDIRECTORY(user_geometry)
ADD_SUBDIRECTORY(viewer)
ADD_SUBDIRECTORY(instanced_geometry)
ADD_SUBDIRECTORY(multi_instanced_geometry)
ADD_SUBDIRECTORY(intersection_filter)
ADD_SUBDIRECTORY(pathtracer)
ADD_SUBDIRECTORY(hair_geometry)
ADD_SUBDIRECTORY(subdivision_geometry)
ADD_SUBDIRECTORY(displacement_geometry)
ADD_SUBDIRECTORY(grid_geometry)
ADD_SUBDIRECTORY(bvh_builder)
ADD_SUBDIRECTORY(lazy_geometry)
ADD_SUBDIRECTORY(bvh_access)
ADD_SUBDIRECTORY(quaternion_motion_blur)
ADD_SUBDIRECTORY(motion_blur_geometry)
ADD_SUBDIRECTORY(interpolation)
ADD_SUBDIRECTORY(curve_geometry)
ADD_SUBDIRECTORY(point_geometry)
ADD_SUBDIRECTORY(buildbench)
ADD_SUBDIRECTORY(convert)
ADD_SUBDIRECTORY(collide)
ADD_SUBDIRECTORY(next_hit)
ADD_SUBDIRECTORY(multiscene_geometry)
ADD_SUBDIRECTORY(ray_mask)
ADD_SUBDIRECTORY(forest)
#ADD_SUBDIRECTORY(debug_device_memory)
#ADD_SUBDIRECTORY(embree_tests)
ADD_SUBDIRECTORY(debug_device_memory)
ADD_SUBDIRECTORY(embree_tests)


ENDIF()

0 comments on commit 506707d

Please sign in to comment.