This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using System.Runtime.InteropServices; | |
using UnityEngine; | |
/// <summary> | |
/// A component that allows to capture point clouds through the experimental Varjo SDK. | |
/// </summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// This benchmark compares different ways to return ranges from functions. As of today (Dec. 1st 2023), no compiler implements `std::generator`, so I used the reference implementation by Lewis Baker (see below). | |
// | |
// Most efficient is to simply return a reference to a range (naturally). However, this is also most restrictive since it does not | |
// allow any processing before returning. | |
// Processing the range before returning involves a copy, which can be inefficient for large ranges. I added a test without | |
// `std::ranges` for comparison, which is second fastest. | |
// `std::ranges` has a significant impact on runtime. Returning the view directly is most efficient in this case. However, this | |
// restricts the interface of the class owning the view. For example you might want to write an pure interface that does simply | |
// return "something iteratable", in which case you do not want to return a specific view directly, as it might not even be possible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#include "pch.h" | |
using namespace System; | |
public interface class IForceDisposable : IDisposable { | |
public: | |
property bool IsDisposed { bool get(); } | |
}; | |
public ref class Base abstract : IForceDisposable { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
#include <iostream> | |
#include <chrono> | |
#include <random> | |
#include <opencv2/core.hpp> | |
#include <opencv2/imgcodecs.hpp> | |
#include <opencv2/highgui.hpp> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################################### | |
# adapted from FindOpenEXR.cmake in Pixar's USD distro. | |
# | |
# The original license is as follows: | |
# | |
# Copyright 2016 Pixar | |
# | |
# Licensed under the Apache License, Version 2.0 (the "Apache License") | |
# with the following modification; you may not use this file except in | |
# compliance with the Apache License and the following modification to it: |