// Copyright 2021-2026 The Khronos Group
// SPDX-License-Identifier: Apache-2.0

// This file was generated by generate_extension_utility.py
// Don't make changes to this directly

#pragma once
#include <anari/anari.h>
typedef struct {
   int ANARI_KHR_CAMERA_SHUTTER;
   int ANARI_KHR_INSTANCE_TRANSFORM;
   int ANARI_KHR_LIGHT_DIRECTIONAL;
   int ANARI_KHR_LIGHT_HDRI;
   int ANARI_KHR_LIGHT_POINT;
   int ANARI_KHR_LIGHT_QUAD;
   int ANARI_KHR_LIGHT_RING;
   int ANARI_KHR_LIGHT_SPOT;
   int ANARI_KHR_SAMPLER_IMAGE1D;
   int ANARI_KHR_SAMPLER_IMAGE2D;
   int ANARI_KHR_SAMPLER_IMAGE3D;
   int ANARI_KHR_SPATIAL_FIELD_STRUCTURED_REGULAR;
   int ANARI_KHR_ARRAY1D_REGION;
   int ANARI_KHR_CAMERA_DEPTH_OF_FIELD;
   int ANARI_KHR_CAMERA_MOTION_TRANSFORMATION;
   int ANARI_KHR_CAMERA_OMNIDIRECTIONAL;
   int ANARI_KHR_CAMERA_ORTHOGRAPHIC;
   int ANARI_KHR_CAMERA_PERSPECTIVE;
   int ANARI_KHR_CAMERA_ROLLING_SHUTTER;
   int ANARI_KHR_CAMERA_STEREO;
   int ANARI_KHR_DATA_PARALLEL_MPI;
   int ANARI_KHR_DEVICE_SYNCHRONIZATION;
   int ANARI_KHR_FRAME_ACCUMULATION;
   int ANARI_KHR_FRAME_CHANNEL_ALBEDO;
   int ANARI_KHR_FRAME_CHANNEL_INSTANCE_ID;
   int ANARI_KHR_FRAME_CHANNEL_NORMAL;
   int ANARI_KHR_FRAME_CHANNEL_OBJECT_ID;
   int ANARI_KHR_FRAME_CHANNEL_PRIMITIVE_ID;
   int ANARI_KHR_FRAME_COMPLETION_CALLBACK;
   int ANARI_KHR_GEOMETRY_CONE;
   int ANARI_KHR_GEOMETRY_CURVE;
   int ANARI_KHR_GEOMETRY_CYLINDER;
   int ANARI_KHR_GEOMETRY_ISOSURFACE;
   int ANARI_KHR_GEOMETRY_QUAD;
   int ANARI_KHR_GEOMETRY_QUAD_MOTION_DEFORMATION;
   int ANARI_KHR_GEOMETRY_SPHERE;
   int ANARI_KHR_GEOMETRY_TRIANGLE;
   int ANARI_KHR_GEOMETRY_TRIANGLE_MOTION_DEFORMATION;
   int ANARI_KHR_INSTANCE_MOTION_SCALE_ROTATION_TRANSLATION;
   int ANARI_KHR_INSTANCE_MOTION_TRANSFORM;
   int ANARI_KHR_INSTANCE_TRANSFORM_ARRAY;
   int ANARI_KHR_LIGHT_PRIMARY_VISIBILITY;
   int ANARI_KHR_MATERIAL_MATTE;
   int ANARI_KHR_MATERIAL_PHYSICALLY_BASED;
   int ANARI_KHR_RENDERER_AMBIENT_LIGHT;
   int ANARI_KHR_RENDERER_BACKGROUND_COLOR;
   int ANARI_KHR_RENDERER_BACKGROUND_IMAGE;
   int ANARI_KHR_RENDERER_DENOISE;
   int ANARI_KHR_SAMPLER_IMAGExD_CLAMP_TO_BORDER;
   int ANARI_KHR_SAMPLER_PRIMITIVE;
   int ANARI_KHR_SAMPLER_TRANSFORM;
   int ANARI_KHR_SPATIAL_FIELD_NANOVDB;
   int ANARI_KHR_SPATIAL_FIELD_STRUCTURED_REGULAR_FILTER_CUBIC;
   int ANARI_KHR_SPATIAL_FIELD_UNSTRUCTURED;
   int ANARI_KHR_VOLUME_TRANSFER_FUNCTION1D;
   int ANARI_EXP_VOLUME_SAMPLE_RATE;
} ANARIExtensions;
// Return all extension identifiers defined by the API JSON inputs.
// The returned array is terminated by a null pointer.
static inline const char *const *anariGetExtensionNames(void) {
    static const char *const names[] = {
        "ANARI_EXP_VOLUME_SAMPLE_RATE",
        "ANARI_EXT_SAMPLER_COMPRESSED_FORMAT_ASTC",
        "ANARI_EXT_SAMPLER_COMPRESSED_FORMAT_BC123",
        "ANARI_EXT_SAMPLER_COMPRESSED_FORMAT_BC45",
        "ANARI_EXT_SAMPLER_COMPRESSED_FORMAT_BC67",
        "ANARI_EXT_SAMPLER_COMPRESSED_FORMAT_EAC",
        "ANARI_EXT_SAMPLER_COMPRESSED_FORMAT_ETC",
        "ANARI_EXT_SAMPLER_COMPRESSED_FORMAT_ETC2",
        "ANARI_EXT_SAMPLER_COMPRESSED_IMAGE2D",
        "ANARI_KHR_ARRAY1D_REGION",
        "ANARI_KHR_CAMERA_DEPTH_OF_FIELD",
        "ANARI_KHR_CAMERA_MOTION_TRANSFORMATION",
        "ANARI_KHR_CAMERA_OMNIDIRECTIONAL",
        "ANARI_KHR_CAMERA_ORTHOGRAPHIC",
        "ANARI_KHR_CAMERA_PERSPECTIVE",
        "ANARI_KHR_CAMERA_ROLLING_SHUTTER",
        "ANARI_KHR_CAMERA_SHUTTER",
        "ANARI_KHR_CAMERA_STEREO",
        "ANARI_KHR_DATA_PARALLEL_MPI",
        "ANARI_KHR_DEVICE_SYNCHRONIZATION",
        "ANARI_KHR_FRAME_ACCUMULATION",
        "ANARI_KHR_FRAME_CHANNEL_ALBEDO",
        "ANARI_KHR_FRAME_CHANNEL_INSTANCE_ID",
        "ANARI_KHR_FRAME_CHANNEL_NORMAL",
        "ANARI_KHR_FRAME_CHANNEL_OBJECT_ID",
        "ANARI_KHR_FRAME_CHANNEL_PRIMITIVE_ID",
        "ANARI_KHR_FRAME_COMPLETION_CALLBACK",
        "ANARI_KHR_GEOMETRY_CONE",
        "ANARI_KHR_GEOMETRY_CURVE",
        "ANARI_KHR_GEOMETRY_CYLINDER",
        "ANARI_KHR_GEOMETRY_ISOSURFACE",
        "ANARI_KHR_GEOMETRY_QUAD",
        "ANARI_KHR_GEOMETRY_QUAD_MOTION_DEFORMATION",
        "ANARI_KHR_GEOMETRY_SPHERE",
        "ANARI_KHR_GEOMETRY_TRIANGLE",
        "ANARI_KHR_GEOMETRY_TRIANGLE_MOTION_DEFORMATION",
        "ANARI_KHR_INSTANCE_MOTION_SCALE_ROTATION_TRANSLATION",
        "ANARI_KHR_INSTANCE_MOTION_TRANSFORM",
        "ANARI_KHR_INSTANCE_TRANSFORM",
        "ANARI_KHR_INSTANCE_TRANSFORM_ARRAY",
        "ANARI_KHR_LIGHT_DIRECTIONAL",
        "ANARI_KHR_LIGHT_HDRI",
        "ANARI_KHR_LIGHT_POINT",
        "ANARI_KHR_LIGHT_PRIMARY_VISIBILITY",
        "ANARI_KHR_LIGHT_QUAD",
        "ANARI_KHR_LIGHT_RING",
        "ANARI_KHR_LIGHT_SPOT",
        "ANARI_KHR_MATERIAL_MATTE",
        "ANARI_KHR_MATERIAL_PHYSICALLY_BASED",
        "ANARI_KHR_RENDERER_AMBIENT_LIGHT",
        "ANARI_KHR_RENDERER_BACKGROUND_COLOR",
        "ANARI_KHR_RENDERER_BACKGROUND_IMAGE",
        "ANARI_KHR_RENDERER_DENOISE",
        "ANARI_KHR_SAMPLER_IMAGE1D",
        "ANARI_KHR_SAMPLER_IMAGE2D",
        "ANARI_KHR_SAMPLER_IMAGE3D",
        "ANARI_KHR_SAMPLER_IMAGExD_CLAMP_TO_BORDER",
        "ANARI_KHR_SAMPLER_PRIMITIVE",
        "ANARI_KHR_SAMPLER_TRANSFORM",
        "ANARI_KHR_SPATIAL_FIELD_NANOVDB",
        "ANARI_KHR_SPATIAL_FIELD_STRUCTURED_REGULAR",
        "ANARI_KHR_SPATIAL_FIELD_STRUCTURED_REGULAR_FILTER_CUBIC",
        "ANARI_KHR_SPATIAL_FIELD_UNSTRUCTURED",
        "ANARI_KHR_VOLUME_TRANSFER_FUNCTION1D",
        0
    };
    return names;
}
int anariGetDeviceExtensionStruct(ANARIExtensions *extensions, ANARILibrary library, const char *deviceName);
int anariGetObjectExtensionStruct(ANARIExtensions *extensions, ANARIDevice device, ANARIDataType objectType, const char *objectName);
int anariGetInstanceExtensionStruct(ANARIExtensions *extensions, ANARIDevice device, ANARIObject object);
#ifdef ANARI_EXTENSION_UTILITY_IMPL
#include <string.h>
static int extension_hash(const char *str) {
   static const uint32_t table[] = {0x4f4e0001u,0x42410002u,0x53520003u,0x4a490004u,0x605f0005u,0x4c450006u,0x5958000du,0x0u,0x0u,0x0u,0x0u,0x0u,0x49480023u,0x5150000eu,0x605f000fu,0x57560010u,0x504f0011u,0x4d4c0012u,0x56550013u,0x4e4d0014u,0x46450015u,0x605f0016u,0x54530017u,0x42410018u,0x4e4d0019u,0x5150001au,0x4d4c001bu,0x4645001cu,0x605f001du,0x5352001eu,0x4241001fu,0x55540020u,0x46450021u,0x1000022u,0x80000037u,0x53520024u,0x605f0025u,0x57410026u,0x5352003cu,0x0u,0x4241004au,0x464100d4u,0x0u,0x535200feu,0x4645016eu,0x0u,0x4f4e02a1u,0x0u,0x0u,0x4a49034au,0x42410393u,0x0u,0x0u,0x0u,0x0u,0x464503b4u,0x514103efu,0x0u,0x0u,0x504f052cu,0x5352003du,0x4241003eu,0x5a59003fu,0x32310040u,0x45440041u,0x605f0042u,0x53520043u,0x46450044u,0x48470045u,0x4a490046u,0x504f0047u,0x4f4e0048u,0x1000049u,0x8000000cu,0x4e4d004bu,0x4645004cu,0x5352004du,0x4241004eu,0x605f004fu,0x54440050u,0x46450060u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x504f006eu,0x0u,0x534d0083u,0x464500a2u,0x0u,0x504f00adu,0x554800bcu,0x51500061u,0x55540062u,0x49480063u,0x605f0064u,0x504f0065u,0x47460066u,0x605f0067u,0x47460068u,0x4a490069u,0x4645006au,0x4d4c006bu,0x4544006cu,0x100006du,0x8000000du,0x5554006fu,0x4a490070u,0x504f0071u,0x4f4e0072u,0x605f0073u,0x55540074u,0x53520075u,0x42410076u,0x4f4e0077u,0x54530078u,0x47460079u,0x504f007au,0x5352007bu,0x4e4d007cu,0x4241007du,0x5554007eu,0x4a49007fu,0x504f0080u,0x4f4e0081u,0x1000082u,0x8000000eu,0x4f4e0089u,0x0u,0x0u,0x0u,0x0u,0x55540097u,0x4a49008au,0x4544008bu,0x4a49008cu,0x5352008du,0x4645008eu,0x4443008fu,0x55540090u,0x4a490091u,0x504f0092u,0x4f4e0093u,0x42410094u,0x4d4c0095u,0x1000096u,0x8000000fu,0x49480098u,0x504f0099u,0x4847009au,0x5352009bu,0x4241009cu,0x5150009du,0x4948009eu,0x4a49009fu,0x444300a0u,0x10000a1u,0x80000010u,0x535200a3u,0x545300a4u,0x515000a5u,0x464500a6u,0x444300a7u,0x555400a8u,0x4a4900a9u,0x575600aau,0x464500abu,0x10000acu,0x80000011u,0x4d4c00aeu,0x4d4c00afu,0x4a4900b0u,0x4f4e00b1u,0x484700b2u,0x605f00b3u,0x545300b4u,0x494800b5u,0x565500b6u,0x555400b7u,0x555400b8u,0x464500b9u,0x535200bau,0x10000bbu,0x80000012u,0x565500c9u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x464500cfu,0x555400cau,0x555400cbu,0x464500ccu,0x535200cdu,0x10000ceu,0x80000000u,0x535200d0u,0x464500d1u,0x504f00d2u,0x10000d3u,0x80000013u,0x555400d9u,0x0u,0x0u,0x0u,0x575600e9u,0x424100dau,0x605f00dbu,0x515000dcu,0x424100ddu,0x535200deu,0x424100dfu,0x4d4c00e0u,0x4d4c00e1u,0x464500e2u,0x4d4c00e3u,0x605f00e4u,0x4e4d00e5u,0x515000e6u,0x4a4900e7u,0x10000e8u,0x80000014u,0x4a4900eau,0x444300ebu,0x464500ecu,0x605f00edu,0x545300eeu,0x5a5900efu,0x4f4e00f0u,0x444300f1u,0x494800f2u,0x535200f3u,0x504f00f4u,0x4f4e00f5u,0x4a4900f6u,0x5b5a00f7u,0x424100f8u,0x555400f9u,0x4a4900fau,0x504f00fbu,0x4f4e00fcu,0x10000fdu,0x80000015u,0x424100ffu,0x4e4d0100u,0x46450101u,0x605f0102u,0x44410103u,0x44430106u,0x0u,0x50480112u,0x44430107u,0x56550108u,0x4e4d0109u,0x5655010au,0x4d4c010bu,0x4241010cu,0x5554010du,0x4a49010eu,0x504f010fu,0x4f4e0110u,0x1000111u,0x80000016u,0x4241011au,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x4e4d015cu,0x4f4e011bu,0x4f4e011cu,0x4645011du,0x4d4c011eu,0x605f011fu,0x51410120u,0x4d4c0130u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x4f4e0136u,0x0u,0x0u,0x0u,0x0u,0x504f0141u,0x43420147u,0x53520150u,0x43420131u,0x46450132u,0x45440133u,0x504f0134u,0x1000135u,0x80000017u,0x54530137u,0x55540138u,0x42410139u,0x4f4e013au,0x4443013bu,0x4645013cu,0x605f013du,0x4a49013eu,0x4544013fu,0x1000140u,0x80000018u,0x53520142u,0x4e4d0143u,0x42410144u,0x4d4c0145u,0x1000146u,0x80000019u,0x4b4a0148u,0x46450149u,0x4443014au,0x5554014bu,0x605f014cu,0x4a49014du,0x4544014eu,0x100014fu,0x8000001au,0x4a490151u,0x4e4d0152u,0x4a490153u,0x55540154u,0x4a490155u,0x57560156u,0x46450157u,0x605f0158u,0x4a490159u,0x4544015au,0x100015bu,0x8000001bu,0x5150015du,0x4d4c015eu,0x4645015fu,0x55540160u,0x4a490161u,0x504f0162u,0x4f4e0163u,0x605f0164u,0x44430165u,0x42410166u,0x4d4c0167u,0x4d4c0168u,0x43420169u,0x4241016au,0x4443016bu,0x4c4b016cu,0x100016du,0x8000001cu,0x504f016fu,0x4e4d0170u,0x46450171u,0x55540172u,0x53520173u,0x5a590174u,0x605f0175u,0x55430176u,0x5a4f0188u,0x0u,0x0u,0x0u,0x0u,0x0u,0x545301a1u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x565501abu,0x0u,0x51500221u,0x53520227u,0x4f4e0193u,0x0u,0x0u,0x0u,0x0u,0x0u,0x53520196u,0x0u,0x0u,0x0u,0x4d4c019au,0x46450194u,0x1000195u,0x8000001du,0x57560197u,0x46450198u,0x1000199u,0x8000001eu,0x4a49019bu,0x4f4e019cu,0x4544019du,0x4645019eu,0x5352019fu,0x10001a0u,0x8000001fu,0x504f01a2u,0x545301a3u,0x565501a4u,0x535201a5u,0x474601a6u,0x424101a7u,0x444301a8u,0x464501a9u,0x10001aau,0x80000020u,0x424101acu,0x454401adu,0x600001aeu,0x80000021u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x4e4d020eu,0x504f020fu,0x55540210u,0x4a490211u,0x504f0212u,0x4f4e0213u,0x605f0214u,0x45440215u,0x46450216u,0x47460217u,0x504f0218u,0x53520219u,0x4e4d021au,0x4241021bu,0x5554021cu,0x4a49021du,0x504f021eu,0x4f4e021fu,0x1000220u,0x80000022u,0x49480222u,0x46450223u,0x53520224u,0x46450225u,0x1000226u,0x80000023u,0x4a490228u,0x42410229u,0x4f4e022au,0x4847022bu,0x4d4c022cu,0x4645022du,0x6000022eu,0x80000024u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x4e4d028eu,0x504f028fu,0x55540290u,0x4a490291u,0x504f0292u,0x4f4e0293u,0x605f0294u,0x45440295u,0x46450296u,0x47460297u,0x504f0298u,0x53520299u,0x4e4d029au,0x4241029bu,0x5554029cu,0x4a49029du,0x504f029eu,0x4f4e029fu,0x10002a0u,0x80000025u,0x545302a2u,0x555402a3u,0x424102a4u,0x4f4e02a5u,0x444302a6u,0x464502a7u,0x605f02a8u,0x554d02a9u,0x504f02b1u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x535202dcu,0x555402b2u,0x4a4902b3u,0x504f02b4u,0x4f4e02b5u,0x605f02b6u,0x555302b7u,0x444302b9u,0x535202d3u,0x424102bau,0x4d4c02bbu,0x464502bcu,0x605f02bdu,0x535202beu,0x504f02bfu,0x555402c0u,0x424102c1u,0x555402c2u,0x4a4902c3u,0x504f02c4u,0x4f4e02c5u,0x605f02c6u,0x555402c7u,0x535202c8u,0x424102c9u,0x4f4e02cau,0x545302cbu,0x4d4c02ccu,0x424102cdu,0x555402ceu,0x4a4902cfu,0x504f02d0u,0x4f4e02d1u,0x10002d2u,0x80000026u,0x424102d4u,0x4f4e02d5u,0x545302d6u,0x474602d7u,0x504f02d8u,0x535202d9u,0x4e4d02dau,0x10002dbu,0x80000027u,0x424102ddu,0x4f4e02deu,0x545302dfu,0x474602e0u,0x504f02e1u,0x535202e2u,0x4e4d02e3u,0x600002e4u,0x80000001u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x42410344u,0x53520345u,0x53520346u,0x42410347u,0x5a590348u,0x1000349u,0x80000028u,0x4847034bu,0x4948034cu,0x5554034du,0x605f034eu,0x5444034fu,0x4a49035fu,0x0u,0x0u,0x0u,0x4544036au,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x534f036eu,0x56550387u,0x4a49038bu,0x5150038fu,0x53520360u,0x46450361u,0x44430362u,0x55540363u,0x4a490364u,0x504f0365u,0x4f4e0366u,0x42410367u,0x4d4c0368u,0x1000369u,0x80000002u,0x5352036bu,0x4a49036cu,0x100036du,0x80000003u,0x4a490372u,0x0u,0x0u,0x4a490376u,0x4f4e0373u,0x55540374u,0x1000375u,0x80000004u,0x4e4d0377u,0x42410378u,0x53520379u,0x5a59037au,0x605f037bu,0x5756037cu,0x4a49037du,0x5453037eu,0x4a49037fu,0x43420380u,0x4a490381u,0x4d4c0382u,0x4a490383u,0x55540384u,0x5a590385u,0x1000386u,0x80000029u,0x42410388u,0x45440389u,0x100038au,0x80000005u,0x4f4e038cu,0x4847038du,0x100038eu,0x80000006u,0x504f0390u,0x55540391u,0x1000392u,0x80000007u,0x55540394u,0x46450395u,0x53520396u,0x4a490397u,0x42410398u,0x4d4c0399u,0x605f039au,0x514d039bu,0x4241039fu,0x0u,0x0u,0x494803a4u,0x555403a0u,0x555403a1u,0x464503a2u,0x10003a3u,0x8000002au,0x5a5903a5u,0x545303a6u,0x4a4903a7u,0x444303a8u,0x424103a9u,0x4d4c03aau,0x4d4c03abu,0x5a5903acu,0x605f03adu,0x434203aeu,0x424103afu,0x545303b0u,0x464503b1u,0x454403b2u,0x10003b3u,0x8000002bu,0x4f4e03b5u,0x454403b6u,0x464503b7u,0x535203b8u,0x464503b9u,0x535203bau,0x605f03bbu,0x454103bcu,0x4e4d03c0u,0x424103cdu,0x0u,0x464503e8u,0x434203c1u,0x4a4903c2u,0x464503c3u,0x4f4e03c4u,0x555403c5u,0x605f03c6u,0x4d4c03c7u,0x4a4903c8u,0x484703c9u,0x494803cau,0x555403cbu,0x10003ccu,0x8000002cu,0x444303ceu,0x4c4b03cfu,0x484703d0u,0x535203d1u,0x504f03d2u,0x565503d3u,0x4f4e03d4u,0x454403d5u,0x605f03d6u,0x4a4303d7u,0x504f03deu,0x0u,0x0u,0x0u,0x0u,0x0u,0x4e4d03e3u,0x4d4c03dfu,0x504f03e0u,0x535203e1u,0x10003e2u,0x8000002du,0x424103e4u,0x484703e5u,0x464503e6u,0x10003e7u,0x8000002eu,0x4f4e03e9u,0x504f03eau,0x4a4903ebu,0x545303ecu,0x464503edu,0x10003eeu,0x8000002fu,0x4e4d03ffu,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x42410487u,0x51500400u,0x4d4c0401u,0x46450402u,0x53520403u,0x605f0404u,0x55490405u,0x4e4d0411u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x53520475u,0x0u,0x0u,0x0u,0x5352047eu,0x42410412u,0x48470413u,0x46450414u,0x79310415u,0x4544045du,0x4544045fu,0x45440461u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x45440463u,0x100045eu,0x80000008u,0x1000460u,0x80000009u,0x1000462u,0x8000000au,0x605f0464u,0x44430465u,0x4d4c0466u,0x42410467u,0x4e4d0468u,0x51500469u,0x605f046au,0x5554046bu,0x504f046cu,0x605f046du,0x4342046eu,0x504f046fu,0x53520470u,0x45440471u,0x46450472u,0x53520473u,0x1000474u,0x80000030u,0x4a490476u,0x4e4d0477u,0x4a490478u,0x55540479u,0x4a49047au,0x5756047bu,0x4645047cu,0x100047du,0x80000031u,0x4241047fu,0x4f4e0480u,0x54530481u,0x47460482u,0x504f0483u,0x53520484u,0x4e4d0485u,0x1000486u,0x80000032u,0x55540488u,0x4a490489u,0x4241048au,0x4d4c048bu,0x605f048cu,0x4746048du,0x4a49048eu,0x4645048fu,0x4d4c0490u,0x45440491u,0x605f0492u,0x564e0493u,0x4241049bu,0x0u,0x0u,0x0u,0x0u,0x555404a2u,0x0u,0x4f4e0520u,0x4f4e049cu,0x504f049du,0x5756049eu,0x4544049fu,0x434204a0u,0x10004a1u,0x80000033u,0x535204a3u,0x565504a4u,0x444304a5u,0x555404a6u,0x565504a7u,0x535204a8u,0x464504a9u,0x454404aau,0x605f04abu,0x535204acu,0x464504adu,0x484704aeu,0x565504afu,0x4d4c04b0u,0x424104b1u,0x535204b2u,0x600004b3u,0x8000000bu,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x0u,0x47460513u,0x4a490514u,0x4d4c0515u,0x55540516u,0x46450517u,0x53520518u,0x605f0519u,0x4443051au,0x5655051bu,0x4342051cu,0x4a49051du,0x4443051eu,0x100051fu,0x80000034u,0x54530521u,0x55540522u,0x53520523u,0x56550524u,0x44430525u,0x55540526u,0x56550527u,0x53520528u,0x46450529u,0x4544052au,0x100052bu,0x80000035u,0x4d4c052du,0x5655052eu,0x4e4d052fu,0x46450530u,0x605f0531u,0x55540532u,0x53520533u,0x42410534u,0x4f4e0535u,0x54530536u,0x47460537u,0x46450538u,0x53520539u,0x605f053au,0x4746053bu,0x5655053cu,0x4f4e053du,0x4443053eu,0x5554053fu,0x4a490540u,0x504f0541u,0x4f4e0542u,0x32310543u,0x45440544u,0x1000545u,0x80000036u};
   uint32_t cur = 0x42410000u;
   for(int i = 0;cur!=0;++i) {
      uint32_t idx = cur&0xFFFFu;
      uint32_t low = (cur>>16u)&0xFFu;
      uint32_t high = (cur>>24u)&0xFFu;
      uint32_t c = (uint32_t)str[i];
      if(c>=low && c<high) {
         cur = table[idx+c-low];
      } else {
         break;
      }
      if(cur&0x80000000u) {
         return cur&0xFFFFu;
      }
      if(str[i]==0) {
         break;
      }
   }
   return -1;
}
static void fillExtensionStruct(ANARIExtensions *extensions, const char *const *list) {
    memset(extensions, 0, sizeof(ANARIExtensions));
    for(const char *const *i = list;*i!=NULL;++i) {
        switch(extension_hash(*i)) {
            case 0: extensions->ANARI_KHR_CAMERA_SHUTTER = 1; break;
            case 1: extensions->ANARI_KHR_INSTANCE_TRANSFORM = 1; break;
            case 2: extensions->ANARI_KHR_LIGHT_DIRECTIONAL = 1; break;
            case 3: extensions->ANARI_KHR_LIGHT_HDRI = 1; break;
            case 4: extensions->ANARI_KHR_LIGHT_POINT = 1; break;
            case 5: extensions->ANARI_KHR_LIGHT_QUAD = 1; break;
            case 6: extensions->ANARI_KHR_LIGHT_RING = 1; break;
            case 7: extensions->ANARI_KHR_LIGHT_SPOT = 1; break;
            case 8: extensions->ANARI_KHR_SAMPLER_IMAGE1D = 1; break;
            case 9: extensions->ANARI_KHR_SAMPLER_IMAGE2D = 1; break;
            case 10: extensions->ANARI_KHR_SAMPLER_IMAGE3D = 1; break;
            case 11: extensions->ANARI_KHR_SPATIAL_FIELD_STRUCTURED_REGULAR = 1; break;
            case 12: extensions->ANARI_KHR_ARRAY1D_REGION = 1; break;
            case 13: extensions->ANARI_KHR_CAMERA_DEPTH_OF_FIELD = 1; break;
            case 14: extensions->ANARI_KHR_CAMERA_MOTION_TRANSFORMATION = 1; break;
            case 15: extensions->ANARI_KHR_CAMERA_OMNIDIRECTIONAL = 1; break;
            case 16: extensions->ANARI_KHR_CAMERA_ORTHOGRAPHIC = 1; break;
            case 17: extensions->ANARI_KHR_CAMERA_PERSPECTIVE = 1; break;
            case 18: extensions->ANARI_KHR_CAMERA_ROLLING_SHUTTER = 1; break;
            case 19: extensions->ANARI_KHR_CAMERA_STEREO = 1; break;
            case 20: extensions->ANARI_KHR_DATA_PARALLEL_MPI = 1; break;
            case 21: extensions->ANARI_KHR_DEVICE_SYNCHRONIZATION = 1; break;
            case 22: extensions->ANARI_KHR_FRAME_ACCUMULATION = 1; break;
            case 23: extensions->ANARI_KHR_FRAME_CHANNEL_ALBEDO = 1; break;
            case 24: extensions->ANARI_KHR_FRAME_CHANNEL_INSTANCE_ID = 1; break;
            case 25: extensions->ANARI_KHR_FRAME_CHANNEL_NORMAL = 1; break;
            case 26: extensions->ANARI_KHR_FRAME_CHANNEL_OBJECT_ID = 1; break;
            case 27: extensions->ANARI_KHR_FRAME_CHANNEL_PRIMITIVE_ID = 1; break;
            case 28: extensions->ANARI_KHR_FRAME_COMPLETION_CALLBACK = 1; break;
            case 29: extensions->ANARI_KHR_GEOMETRY_CONE = 1; break;
            case 30: extensions->ANARI_KHR_GEOMETRY_CURVE = 1; break;
            case 31: extensions->ANARI_KHR_GEOMETRY_CYLINDER = 1; break;
            case 32: extensions->ANARI_KHR_GEOMETRY_ISOSURFACE = 1; break;
            case 33: extensions->ANARI_KHR_GEOMETRY_QUAD = 1; break;
            case 34: extensions->ANARI_KHR_GEOMETRY_QUAD_MOTION_DEFORMATION = 1; break;
            case 35: extensions->ANARI_KHR_GEOMETRY_SPHERE = 1; break;
            case 36: extensions->ANARI_KHR_GEOMETRY_TRIANGLE = 1; break;
            case 37: extensions->ANARI_KHR_GEOMETRY_TRIANGLE_MOTION_DEFORMATION = 1; break;
            case 38: extensions->ANARI_KHR_INSTANCE_MOTION_SCALE_ROTATION_TRANSLATION = 1; break;
            case 39: extensions->ANARI_KHR_INSTANCE_MOTION_TRANSFORM = 1; break;
            case 40: extensions->ANARI_KHR_INSTANCE_TRANSFORM_ARRAY = 1; break;
            case 41: extensions->ANARI_KHR_LIGHT_PRIMARY_VISIBILITY = 1; break;
            case 42: extensions->ANARI_KHR_MATERIAL_MATTE = 1; break;
            case 43: extensions->ANARI_KHR_MATERIAL_PHYSICALLY_BASED = 1; break;
            case 44: extensions->ANARI_KHR_RENDERER_AMBIENT_LIGHT = 1; break;
            case 45: extensions->ANARI_KHR_RENDERER_BACKGROUND_COLOR = 1; break;
            case 46: extensions->ANARI_KHR_RENDERER_BACKGROUND_IMAGE = 1; break;
            case 47: extensions->ANARI_KHR_RENDERER_DENOISE = 1; break;
            case 48: extensions->ANARI_KHR_SAMPLER_IMAGExD_CLAMP_TO_BORDER = 1; break;
            case 49: extensions->ANARI_KHR_SAMPLER_PRIMITIVE = 1; break;
            case 50: extensions->ANARI_KHR_SAMPLER_TRANSFORM = 1; break;
            case 51: extensions->ANARI_KHR_SPATIAL_FIELD_NANOVDB = 1; break;
            case 52: extensions->ANARI_KHR_SPATIAL_FIELD_STRUCTURED_REGULAR_FILTER_CUBIC = 1; break;
            case 53: extensions->ANARI_KHR_SPATIAL_FIELD_UNSTRUCTURED = 1; break;
            case 54: extensions->ANARI_KHR_VOLUME_TRANSFER_FUNCTION1D = 1; break;
            case 55: extensions->ANARI_EXP_VOLUME_SAMPLE_RATE = 1; break;
            default: break;
        }
    }
}
int anariGetDeviceExtensionStruct(ANARIExtensions *extensions, ANARILibrary library, const char *deviceName) {
    const char *const *list = (const char *const *)anariGetDeviceExtensions(library, deviceName);
    if(list) {
        fillExtensionStruct(extensions, list);
        return 0;
    } else {
        return 1;
    }
}
int anariGetObjectExtensionStruct(ANARIExtensions *extensions, ANARIDevice device, ANARIDataType objectType, const char *objectName) {
    const char *const *list = (const char *const *)anariGetObjectInfo(device, objectType, objectName, "extension", ANARI_STRING_LIST);
    if(list) {
        fillExtensionStruct(extensions, list);
        return 0;
    } else {
        return 1;
    }
}
int anariGetInstanceExtensionStruct(ANARIExtensions *extensions, ANARIDevice device, ANARIObject object) {
    const char *const *list = NULL;
    anariGetProperty(device, object, "extension", ANARI_STRING_LIST, &list, sizeof(list), ANARI_WAIT);
    if(list) {
        fillExtensionStruct(extensions, list);
        return 0;
    } else {
        return 1;
    }
}
#endif
