Удаление лишних файлов / Removing of extra and old files from the repository
This commit is contained in:
parent
beb237fd4e
commit
985b1e0c84
49 changed files with 0 additions and 6855 deletions
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_workspace_layout_file>
|
||||
<FileVersion major="1" minor="0" />
|
||||
<ActiveProject path="basic-geometry-dev/basic-geometry-dev.cbp" />
|
||||
<PreferredTarget name="Release" />
|
||||
</CodeBlocks_workspace_layout_file>
|
|
@ -1,50 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="geometry-dev" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="bin/Debug/geometry-dev" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Debug/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
<Add directory="../src" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="geometry" />
|
||||
<Add library="m" />
|
||||
<Add directory="../src/bin/Debug" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="bin/Release/geometry-dev" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Release/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
<Add directory="../src" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-O2" />
|
||||
<Add option="-s" />
|
||||
<Add library="geometry" />
|
||||
<Add library="m" />
|
||||
<Add directory="../src/bin/Release" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Unit filename="main.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Extensions />
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
|
@ -1,126 +0,0 @@
|
|||
# depslib dependency file v1.0
|
||||
1732169779 source:/home/andrey/Projects/Private/C/Geometry/dev/main.c
|
||||
<stdio.h>
|
||||
<stdlib.h>
|
||||
<math.h>
|
||||
<geometry.h>
|
||||
<windows.h>
|
||||
<time.h>
|
||||
|
||||
1731906002 /home/andrey/Projects/Private/C/Geometry/src/geometry.h
|
||||
"basis.h"
|
||||
"angle.h"
|
||||
"vector2.h"
|
||||
"vector3.h"
|
||||
"matrixes.h"
|
||||
"matrix2x2.h"
|
||||
"matrix2x3.h"
|
||||
"matrix3x2.h"
|
||||
"matrix3x3.h"
|
||||
"rotation3.h"
|
||||
"quaternion.h"
|
||||
"versor.h"
|
||||
|
||||
1732094620 /home/andrey/Projects/Private/C/Geometry/src/basis.h
|
||||
|
||||
1732096335 /home/andrey/Projects/Private/C/Geometry/src/angle.h
|
||||
<math.h>
|
||||
"basis.h"
|
||||
|
||||
1732095049 /home/andrey/Projects/Private/C/Geometry/src/vector2.h
|
||||
"basis.h"
|
||||
"angle.h"
|
||||
<math.h>
|
||||
|
||||
1732095097 /home/andrey/Projects/Private/C/Geometry/src/vector3.h
|
||||
"basis.h"
|
||||
"angle.h"
|
||||
<math.h>
|
||||
|
||||
1729500312 /home/andrey/Projects/Private/C/Geometry/src/vector4.h
|
||||
"basis.h"
|
||||
"angle.h"
|
||||
<math.h>
|
||||
|
||||
1732095748 /home/andrey/Projects/Private/C/Geometry/src/matrix2x2.h
|
||||
"angle.h"
|
||||
"vector2.h"
|
||||
"matrixes.h"
|
||||
|
||||
1732095414 /home/andrey/Projects/Private/C/Geometry/src/matrix3x3.h
|
||||
"vector3.h"
|
||||
"matrixes.h"
|
||||
|
||||
1729490844 /home/andrey/Projects/Private/C/Geometry/src/matrix4x4.h
|
||||
"vector4.h"
|
||||
|
||||
1729490850 /home/andrey/Projects/Private/C/Geometry/src/tangent.h
|
||||
<math.h>
|
||||
"basis.h"
|
||||
"angle.h"
|
||||
"vector2.h"
|
||||
"matrix2x2.h"
|
||||
|
||||
1732095748 /home/andrey/Projects/Private/C/Geometry/src/rotation3.h
|
||||
"basis.h"
|
||||
"angle.h"
|
||||
"vector3.h"
|
||||
|
||||
1732169837 /home/andrey/Projects/Private/C/Geometry/src/versor.h
|
||||
<stdint.h>
|
||||
"basis.h"
|
||||
"vector3.h"
|
||||
"rotation3.h"
|
||||
"matrix3x3.h"
|
||||
|
||||
1729503008 /home/andrey/Projects/Private/C/Geometry/src/affine_map2.h
|
||||
"vector2.h"
|
||||
"matrix2x2.h"
|
||||
|
||||
1729502996 /home/andrey/Projects/Private/C/Geometry/src/affine_map3.h
|
||||
"vector3.h"
|
||||
"matrix3x3.h"
|
||||
|
||||
1729503020 /home/andrey/Projects/Private/C/Geometry/src/affine_map4.h
|
||||
"vector4.h"
|
||||
"matrix4x4.h"
|
||||
|
||||
1729426494 /home/andrey/Projects/Private/C/Geometry/src/cartesian-frame2.h
|
||||
"vector2.h"
|
||||
"tangent.h"
|
||||
"affine_map2.h"
|
||||
|
||||
1729444022 /home/andrey/Projects/Private/C/Geometry/src/cartesian-frame3.h
|
||||
<math.h>
|
||||
"vector3.h"
|
||||
"versor.h"
|
||||
"affine_map3.h"
|
||||
|
||||
1729593024 /home/andrey/Projects/Private/C/Geometry/src/position2.h
|
||||
"vector2.h"
|
||||
"tangent.h"
|
||||
"affine_map2.h"
|
||||
|
||||
1729593010 /home/andrey/Projects/Private/C/Geometry/src/position3.h
|
||||
<math.h>
|
||||
"vector3.h"
|
||||
"versor.h"
|
||||
"affine_map3.h"
|
||||
|
||||
1732094620 /home/andrey/Projects/Private/C/Geometry/src/matrixes.h
|
||||
|
||||
1732095530 /home/andrey/Projects/Private/C/Geometry/src/matrix2x3.h
|
||||
"vector2.h"
|
||||
"vector3.h"
|
||||
"matrixes.h"
|
||||
|
||||
1732095530 /home/andrey/Projects/Private/C/Geometry/src/matrix3x2.h
|
||||
"vector2.h"
|
||||
"vector3.h"
|
||||
"matrixes.h"
|
||||
|
||||
1732095234 /home/andrey/Projects/Private/C/Geometry/src/quaternion.h
|
||||
<math.h>
|
||||
"basis.h"
|
||||
"matrix3x3.h"
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_layout_file>
|
||||
<FileVersion major="1" minor="0" />
|
||||
<ActiveTarget name="Release" />
|
||||
<File name="main.c" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1168" topLine="46" />
|
||||
</Cursor>
|
||||
</File>
|
||||
</CodeBlocks_layout_file>
|
|
@ -1,165 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\src\geometry.vcxproj">
|
||||
<Project>{40ca6fb4-135f-4d54-a8d9-7338ba56e6a7}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{46de6c8f-3179-4652-95cf-28d44ac4774a}</ProjectGuid>
|
||||
<RootNamespace>geometry-dev</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Исходные файлы">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы заголовков">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы ресурсов">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.c">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
194
dev/main.c
194
dev/main.c
|
@ -1,194 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <geometry.h>
|
||||
|
||||
#ifdef _WIN64
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif // _WINDOWS_
|
||||
|
||||
BgFP32Versor * allocate_versors(const unsigned int amount)
|
||||
{
|
||||
return calloc(amount, sizeof(BgFP32Versor));
|
||||
}
|
||||
|
||||
BgFP32Versor * make_zero_versors(const unsigned int amount)
|
||||
{
|
||||
BgFP32Versor * list = allocate_versors(amount);
|
||||
|
||||
if (list == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < amount; i++) {
|
||||
bg_fp32_versor_reset(&list[i]);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
BgFP32Versor * make_random_versors(const unsigned int amount)
|
||||
{
|
||||
BgFP32Versor * list = allocate_versors(amount);
|
||||
|
||||
if (list == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < amount; i++) {
|
||||
bg_fp32_versor_set_values(
|
||||
(2.0f * rand()) / RAND_MAX - 1.0f,
|
||||
(2.0f * rand()) / RAND_MAX - 1.0f,
|
||||
(2.0f * rand()) / RAND_MAX - 1.0f,
|
||||
(2.0f * rand()) / RAND_MAX - 1.0f,
|
||||
&list[i]
|
||||
);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
void print_versor(const BgFP32Versor* versor)
|
||||
{
|
||||
printf("(%f, %f, %f, %f)\n", versor->s0, versor->x1, versor->x2, versor->x3);
|
||||
}
|
||||
|
||||
void print_vector(const BgFP32Vector3* vector)
|
||||
{
|
||||
printf("(%f, %f, %f) / %f\n", vector->x1, vector->x2, vector->x3, bg_fp32_vector3_get_module(vector));
|
||||
}
|
||||
/*
|
||||
int main()
|
||||
{
|
||||
const unsigned int amount = 1000000;
|
||||
|
||||
#ifdef _WIN64
|
||||
ULONGLONG now;
|
||||
now = GetTickCount64();
|
||||
srand((unsigned int)(now & 0xfffffff));
|
||||
#else
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_REALTIME, &now);
|
||||
srand((unsigned int)(now.tv_nsec & 0xfffffff));
|
||||
#endif // _WIN64
|
||||
|
||||
BgFP32Versor * versors = make_random_versors(amount);
|
||||
|
||||
if (versors == 0) {
|
||||
printf("Cannot allocate memory for versors");
|
||||
return 0;
|
||||
}
|
||||
|
||||
BgFP32Vector3 initial, result;
|
||||
|
||||
bg_fp32_vector3_set_values(1, 2, 3, &initial);
|
||||
bg_fp32_vector3_copy(&initial, &result);
|
||||
|
||||
#ifdef _WIN64
|
||||
ULONGLONG start, end;
|
||||
start = GetTickCount64();
|
||||
#else
|
||||
struct timespec start, end;
|
||||
clock_gettime(CLOCK_REALTIME, &start);
|
||||
#endif // _WIN64
|
||||
for (unsigned int i = 0; i < amount; i++) {
|
||||
bg_fp32_versor_turn2(&versors[i], &result, &result);
|
||||
}
|
||||
|
||||
for (unsigned int i = amount; i > 0; i--) {
|
||||
bg_fp32_versor_turn_back2(&versors[i - 1], &result, &result);
|
||||
}
|
||||
|
||||
#ifdef _WIN64
|
||||
end = GetTickCount64();
|
||||
|
||||
printf("Time: %lld\n", end - start);
|
||||
#else
|
||||
clock_gettime(CLOCK_REALTIME, &end);
|
||||
|
||||
printf("Time: %lf\n", (end.tv_sec - start.tv_sec) * 1000.0 + (end.tv_nsec - start.tv_nsec) * 0.000001);
|
||||
#endif // _WIN64
|
||||
|
||||
|
||||
print_vector(&initial);
|
||||
print_vector(&result);
|
||||
|
||||
free(versors);
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
const unsigned int amount = 1000000;
|
||||
|
||||
#ifdef _WIN64
|
||||
ULONGLONG now;
|
||||
now = GetTickCount64();
|
||||
srand((unsigned int)(now & 0xfffffff));
|
||||
#else
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_REALTIME, &now);
|
||||
srand((unsigned int)(now.tv_nsec & 0xfffffff));
|
||||
#endif // _WIN64
|
||||
|
||||
BgFP32Versor * versors1 = make_random_versors(amount);
|
||||
|
||||
if (versors1 == 0) {
|
||||
printf("Cannot allocate memory for versors1");
|
||||
return 0;
|
||||
}
|
||||
|
||||
BgFP32Versor * versors2 = make_random_versors(amount);
|
||||
|
||||
if (versors2 == 0) {
|
||||
printf("Cannot allocate memory for versors2");
|
||||
free(versors1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
BgFP32Versor * results = make_zero_versors(amount);
|
||||
|
||||
if (results == 0) {
|
||||
printf("Cannot allocate memory for results");
|
||||
free(versors2);
|
||||
free(versors1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _WIN64
|
||||
ULONGLONG start, end;
|
||||
start = GetTickCount64();
|
||||
#else
|
||||
struct timespec start, end;
|
||||
clock_gettime(CLOCK_REALTIME, &start);
|
||||
#endif // _WIN64
|
||||
for (int j = 0; j < 1000; j++) {
|
||||
for (unsigned int i = 0; i < amount; i++) {
|
||||
bg_fp32_versor_combine(&versors1[i], &versors2[i], &results[i]);
|
||||
}
|
||||