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
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA
# CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0


set(OWL_VERSION_MAJOR 1)
set(OWL_VERSION_MINOR 2)
set(OWL_VERSION_PATCH 4)
set(OWL_VERSION_PATCH 5)

cmake_minimum_required(VERSION 3.24)

Expand Down
2 changes: 1 addition & 1 deletion include/owl/owl_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ owlAsyncLaunch2DOnDevice(OWLRayGen rayGen, int dims_x, int dims_y,
int deviceID, OWLParams params);


OWL_API cudaTextureObject_t//CUstream
OWL_API cudaStream_t
owlParamsGetCudaStream(OWLParams params, int deviceID);

/*! wait for the async launch to finish */
Expand Down
9 changes: 4 additions & 5 deletions owl/APIContext.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA
// CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#include "APIContext.h"
#include "APIHandle.h"

Expand Down Expand Up @@ -46,15 +45,15 @@ namespace owl {
for (auto &it : activeHandles) {
if (it && it->object
) {
// PRINT(it->object->toString());
it->object = {};
it->context = {};
handlesToFree.push_back(it);
}
}
activeHandles.clear();
for (auto handle : handlesToFree)
for (auto handle : handlesToFree) {
delete handle;
}
}

void APIContext::track(APIHandle *object)
Expand Down
6 changes: 2 additions & 4 deletions owl/Context.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA
// CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#include "Context.h"
#include "Module.h"
#include "Geometry.h"
Expand Down Expand Up @@ -65,7 +64,6 @@ namespace owl {
devices.clear();
}


void Context::enablePeerAccess()
{
LOG("enabling peer access ('.'=self, '+'=can access other device)");
Expand Down
5 changes: 2 additions & 3 deletions owl/Context.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA
// CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#pragma once

#include "DeviceContext.h"
Expand Down
8 changes: 3 additions & 5 deletions owl/DeviceContext.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA
// CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#include "Context.h"
#include "UserGeom.h"
#include "InstanceGroup.h"
Expand Down Expand Up @@ -216,7 +215,7 @@ namespace owl {
destroyPipeline();

OPTIX_CHECK(optixDeviceContextDestroy(optixContext));
cudaStreamDestroy(stream);
OWL_CUDA_CALL_NOTHROW(StreamDestroy(stream));
}


Expand Down Expand Up @@ -244,7 +243,6 @@ namespace owl {
pipeline = 0;
}


void DeviceContext::configurePipelineOptions(bool debug)
{
// ------------------------------------------------------------------
Expand Down
5 changes: 2 additions & 3 deletions owl/DeviceContext.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA
// CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#pragma once

#include "owl/owl.h"
Expand Down
13 changes: 7 additions & 6 deletions owl/DeviceMemory.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA
// CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#pragma once

#include "owl/helper/cuda.h"
Expand Down Expand Up @@ -124,11 +123,13 @@ namespace owl {

struct PinnedHostMem {
PinnedHostMem() = default;
~PinnedHostMem() { if (ptr) cudaFree(ptr); }
~PinnedHostMem() {
if (ptr) OWL_CUDA_CALL_NOTHROW(FreeHost(ptr));
}
void resize(size_t N) {
if (ptr) cudaFree(ptr);
if (ptr) OWL_CUDA_CALL(Free(ptr));
ptr = 0;
if (N > 0) cudaMallocHost(&ptr,N);
if (N > 0) OWL_CUDA_CALL(MallocHost(&ptr,N));
}
uint8_t *data() { return ptr; }

Expand Down
16 changes: 11 additions & 5 deletions owl/LaunchParams.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA
// CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#include "LaunchParams.h"
#include "Context.h"

Expand All @@ -11,13 +10,16 @@ namespace owl {
// ------------------------------------------------------------------
// LaunchParamsType
// ------------------------------------------------------------------

LaunchParamsType::LaunchParamsType(Context *const context,
size_t varStructSize,
const std::vector<OWLVarDecl> &varDecls)
: SBTObjectType(context,context->launchParamTypes,varStructSize,varDecls)
{}

LaunchParamsType::~LaunchParamsType()
{}

/*! creates the device-specific data for this group */
Object::DeviceData::SP
LaunchParamsType::createOn(const DeviceContext::SP &device)
Expand Down Expand Up @@ -48,7 +50,8 @@ namespace owl {

LaunchParams::DeviceData::~DeviceData()
{
cudaStreamDestroy(stream);
if (stream)
OWL_CUDA_CALL_NOTHROW(StreamDestroy(stream));
}

// ------------------------------------------------------------------
Expand All @@ -64,6 +67,9 @@ namespace owl {
assert(type.get());
}

LaunchParams::~LaunchParams()
{}

/*! pretty-printer, for printf-debugging */
std::string LaunchParams::toString() const
{
Expand Down
11 changes: 6 additions & 5 deletions owl/LaunchParams.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA
// CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#pragma once

#include "SBTObject.h"
Expand All @@ -23,7 +22,7 @@ namespace owl {
LaunchParamsType(Context *const context,
size_t varStructSize,
const std::vector<OWLVarDecl> &varDecls);
virtual ~LaunchParamsType() = default;
~LaunchParamsType() override;

Object::DeviceData::SP createOn(const DeviceContext::SP &device) override;

Expand All @@ -44,7 +43,7 @@ namespace owl {

/*! constructor, which allocs all the device-side data */
DeviceData(const DeviceContext::SP &device, size_t dataSize);
virtual ~DeviceData();
~DeviceData() override;

const size_t dataSize;

Expand All @@ -67,6 +66,8 @@ namespace owl {
/*! create a new instenace of given launch param type */
LaunchParams(Context *const context,
LaunchParamsType::SP type);
~LaunchParams() override;

/*! create a new instenace of given launch param type */

/*! pretty-printer, for printf-debugging */
Expand Down
8 changes: 4 additions & 4 deletions owl/Object.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025-2026
// NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#pragma once

#include "DeviceContext.h"

namespace owl {

/*! convert a OWLDataType enum into a strict that represents the name of that type */
/*! convert a OWLDataType enum into a strict that represents the
name of that type */
std::string typeToString(OWLDataType type);

/*! returns number of bytes for given data type (where applicable) */
Expand Down
8 changes: 5 additions & 3 deletions owl/ObjectRegistry.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA
// CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#include "ObjectRegistry.h"
#include "RegisteredObject.h"
#include "Context.h"
Expand All @@ -14,6 +13,9 @@

namespace owl {

ObjectRegistry::~ObjectRegistry()
{}

void ObjectRegistry::forget(RegisteredObject *object)
{
assert(object);
Expand Down
7 changes: 3 additions & 4 deletions owl/ObjectRegistry.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA
// CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#pragma once

#include "Object.h"
Expand All @@ -18,7 +17,7 @@ namespace owl {
in this registry under this ID */
struct ObjectRegistry {
ObjectRegistry() = default;
virtual ~ObjectRegistry() = default;
virtual ~ObjectRegistry();

// ReallocContextIDsCB reallocContextIDs,
// const char *typeDescription);
Expand Down
5 changes: 2 additions & 3 deletions owl/RegisteredObject.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA
// CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#include "RegisteredObject.h"
#include "ObjectRegistry.h"

Expand Down
7 changes: 3 additions & 4 deletions owl/RegisteredObject.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA
// CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#pragma once

#include "Object.h"
Expand All @@ -20,7 +19,7 @@ namespace owl {

RegisteredObject(Context *const context,
ObjectRegistry &registry);
virtual ~RegisteredObject();
~RegisteredObject() override;

/*! the ID we're registered by - should only ever get set to any
useful value in the constructor, and get set to -1 when the
Expand Down
8 changes: 5 additions & 3 deletions owl/SBTObject.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA
// CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0



#include "SBTObject.h"

namespace owl {
Expand Down Expand Up @@ -93,6 +92,9 @@ namespace owl {
variables(type->instantiateVariables())
{}

SBTObjectBase::~SBTObjectBase()
{}

/*! this function is arguably the heart of the owl variable layer:
given an SBT Object's set of variables, create the SBT entry
that writes the given variables' values into the specified
Expand Down
Loading