- From console create file:
dd if=/dev/zero of=/tmp/sharedfile bs=12288 count=1
- The C# program
- The C program
mcs Sender.cs
CLANG_DIR = $(HOME)/clang+llvm-13.0.1-x86_64-linux-gnu-ubuntu-18.04 | |
CLANG = $(CLANG_DIR)/bin/clang | |
LLC = $(CLANG_DIR)/bin/llc | |
LD = $(CLANG_DIR)/bin/wasm-ld | |
C_SRC := $(wildcard src/c/*.c) | |
OBJ_SRC := $(patsubst %.c, %.o, $(C_SRC)) | |
%.o: %.c # delete competing implicit rule |
using UnityEngine; | |
using UnityEngine.AI; | |
namespace AIEngineTest | |
{ | |
public class Archetype : MonoBehaviour, | |
IHiraBotArchetype<NavMeshAgent>, | |
IHiraBotArchetype<Animator>, | |
IHiraBotArchetype<ConsolidatedSensor>, | |
IHiraBotArchetype<HiraLGOAPRealtimeBot>, |
// ------------------------------------------------------------------------------------ AddressInfo | |
// --- AddressInfo -------------------------------------------------------------------------------- | |
public static class AddressInfo | |
{ | |
public static string prefabGroup = "Prefabs"; | |
public static string prefabLabel = "Prefab"; | |
} | |
// ------------------------------------------------------------------------------ AddressableHelper | |
// --- AddressableHelper -------------------------------------------------------------------------- |
I think using scopes greatly improves readability. Here's an example of converting a larger section of code. The indenting makes it immediately clear when a scopes begins and ends. Both snippets of code draw the exact same controls.
Before:
EditorGUILayout.BeginVertical("box");
disable = EditorGUILayout.Toggle("Disable Sliders", disable);
indent = EditorGUILayout.IntSlider("Indent Sliders", indent, 1, 4);
#include <cassert> | |
#include <iostream> | |
#include <functional> | |
#include <memory> | |
#include <type_traits> | |
#include <typeinfo> | |
#include <typeindex> | |
#include <utility> | |
#include <unordered_map> |
using UnityEditor; | |
using System; | |
public static class IMGUIDebugger { | |
static Type type = Type.GetType( "UnityEditor.GUIViewDebuggerWindow,UnityEditor" ); | |
[MenuItem( "Window/IMGUI Debugger" )] | |
public static void Open() => EditorWindow.GetWindow( type ).Show(); | |
The idea es to evaluate if it is worth it to have parallel versions of some methods in order to speed up processing or obtain better readable code than trying to parallelize outside the library.
The first step in the analysis is to perform a basic benchmark test to see if some gain is achieved with rudimentary algorithms. For that matter a modified version of ENTT library is used, which posses parallel version of most of the methods. I modified ENTT library in a very straight forward and awful way, I just peek here and there an replaced the algorithms that GCC already implemented in parallel and renamed that method to same name with _par suffix. Then I replaced in other methods any calls I found to those 'double version methods' and I made those other also _par suffixed. Of course this is no way to parallelize code, thought must be put in order to decide where to parallelize, but it is a start. (btw: sorry to doing that to your code
#include "Nodes.h" | |
namespace ImGui | |
{ | |
template<int n> | |
struct BezierWeights | |
{ | |
constexpr BezierWeights() : x_(), y_(), z_(), w_() | |
{ | |
for (int i = 1; i <= n; ++i) |
#include <any> | |
#include <cmath> | |
#include <imgui.h> | |
#include <imgui_internal.h> | |
#include "NodeGraph.hpp" | |
namespace | |
{ |