Skip to content
Open
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "third_party/flatbuffers"]
path = cpp/thirdparty/flatbuffers
url = https://github.com/ray-project/flatbuffers.git
12 changes: 11 additions & 1 deletion cpp/src/arrow/util/memory-pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ namespace {
Status AllocateAligned(int64_t size, uint8_t** out) {
// TODO(emkornfield) find something compatible with windows
constexpr size_t kAlignment = 64;
const int result = posix_memalign(reinterpret_cast<void**>(out), kAlignment, size);
const int result =
#ifdef _WIN32
((*out = static_cast<uint8_t *>(_aligned_malloc(size, kAlignment))) ? 0 : errno)
#else
posix_memalign(reinterpret_cast<void**>(out), kAlignment, size)
#endif
;
if (result == ENOMEM) {
std::stringstream ss;
ss << "malloc of size " << size << " failed";
Expand Down Expand Up @@ -83,7 +89,11 @@ int64_t InternalMemoryPool::bytes_allocated() const {
void InternalMemoryPool::Free(uint8_t* buffer, int64_t size) {
std::lock_guard<std::mutex> guard(pool_lock_);
DCHECK_GE(bytes_allocated_, size);
#ifdef _WIN32
_aligned_free(buffer);
#else
std::free(buffer);
#endif
bytes_allocated_ -= size;
}

Expand Down
1 change: 1 addition & 0 deletions cpp/thirdparty/flatbuffers
Submodule flatbuffers added at 05cac3
28 changes: 28 additions & 0 deletions vsprojects/arrow.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir>$(SolutionDir)build\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)build\$(Platform)\$(Configuration)\$(MSBuildProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Label="Globals">
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir)..\cpp\src;$(ProjectDir)..\cpp\thirdparty\flatbuffers\include;$(ProjectDir)..\cpp\thirdparty\parquet\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<PreprocessorDefinitions>ARROW_UTIL_VISIBILITY_H=;ARROW_EXPORT=;ARROW_NO_EXPORT=;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<PreprocessorDefinitions>NDEBUG;PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
</Project>
116 changes: 116 additions & 0 deletions vsprojects/arrow.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" 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>
<PropertyGroup Label="Globals">
<ProjectGuid>{10E7D8E8-0EEB-46EA-A58D-F9236B5960AD}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="Arrow.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemGroup>
<ClCompile Include="..\cpp\src\arrow\array.cc" />
<ClCompile Include="..\cpp\src\arrow\builder.cc" />
<ClCompile Include="..\cpp\src\arrow\column.cc" />
<ClCompile Include="..\cpp\src\arrow\io\file.cc" />
<ClCompile Include="..\cpp\src\arrow\io\interfaces.cc" />
<ClCompile Include="..\cpp\src\arrow\ipc\adapter.cc" />
<ClCompile Include="..\cpp\src\arrow\ipc\metadata-internal.cc" />
<ClCompile Include="..\cpp\src\arrow\ipc\metadata.cc" />
<ClCompile Include="..\cpp\src\arrow\schema.cc" />
<ClCompile Include="..\cpp\src\arrow\table.cc" />
<ClCompile Include="..\cpp\src\arrow\type.cc" />
<ClCompile Include="..\cpp\src\arrow\types\construct.cc" />
<ClCompile Include="..\cpp\src\arrow\types\decimal.cc" />
<ClCompile Include="..\cpp\src\arrow\types\list.cc" />
<ClCompile Include="..\cpp\src\arrow\types\primitive.cc" />
<ClCompile Include="..\cpp\src\arrow\types\string.cc" />
<ClCompile Include="..\cpp\src\arrow\types\struct.cc" />
<ClCompile Include="..\cpp\src\arrow\types\union.cc" />
<ClCompile Include="..\cpp\src\arrow\util\bit-util.cc" />
<ClCompile Include="..\cpp\src\arrow\util\buffer.cc" />
<ClCompile Include="..\cpp\src\arrow\util\memory-pool.cc" />
<ClCompile Include="..\cpp\src\arrow\util\status.cc" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\cpp\src\arrow\api.h" />
<ClInclude Include="..\cpp\src\arrow\array.h" />
<ClInclude Include="..\cpp\src\arrow\builder.h" />
<ClInclude Include="..\cpp\src\arrow\column.h" />
<ClInclude Include="..\cpp\src\arrow\io\file.h" />
<ClInclude Include="..\cpp\src\arrow\io\interfaces.h" />
<ClInclude Include="..\cpp\src\arrow\ipc\adapter.h" />
<ClInclude Include="..\cpp\src\arrow\ipc\metadata-internal.h" />
<ClInclude Include="..\cpp\src\arrow\ipc\metadata.h" />
<ClInclude Include="..\cpp\src\arrow\ipc\test-common.h" />
<ClInclude Include="..\cpp\src\arrow\schema.h" />
<ClInclude Include="..\cpp\src\arrow\table.h" />
<ClInclude Include="..\cpp\src\arrow\test-util.h" />
<ClInclude Include="..\cpp\src\arrow\type.h" />
<ClInclude Include="..\cpp\src\arrow\types\construct.h" />
<ClInclude Include="..\cpp\src\arrow\types\datetime.h" />
<ClInclude Include="..\cpp\src\arrow\types\decimal.h" />
<ClInclude Include="..\cpp\src\arrow\types\list.h" />
<ClInclude Include="..\cpp\src\arrow\types\primitive.h" />
<ClInclude Include="..\cpp\src\arrow\types\string.h" />
<ClInclude Include="..\cpp\src\arrow\types\struct.h" />
<ClInclude Include="..\cpp\src\arrow\types\test-common.h" />
<ClInclude Include="..\cpp\src\arrow\types\union.h" />
<ClInclude Include="..\cpp\src\arrow\util\bit-util.h" />
<ClInclude Include="..\cpp\src\arrow\util\buffer.h" />
<ClInclude Include="..\cpp\src\arrow\util\logging.h" />
<ClInclude Include="..\cpp\src\arrow\util\macros.h" />
<ClInclude Include="..\cpp\src\arrow\util\memory-pool.h" />
<ClInclude Include="..\cpp\src\arrow\util\random.h" />
<ClInclude Include="..\cpp\src\arrow\util\status.h" />
<ClInclude Include="..\cpp\src\arrow\util\visibility.h" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\format\Message.fbs">
<FileType>Document</FileType>
<Command>"$(OutDir)flatc.exe" -c -o "$(ProjectDir)..\cpp\src\arrow\ipc" "%(FullPath)"</Command>
<Outputs>$(ProjectDir)..\cpp\src\arrow\ipc\Message_generated.h;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\format\File.fbs">
<FileType>Document</FileType>
<Command>"$(OutDir)flatc.exe" -c -o "$(ProjectDir)..\cpp\src\arrow\ipc" "%(FullPath)"</Command>
<Outputs>$(ProjectDir)..\cpp\src\arrow\ipc\Message_generated.h;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\cpp\thirdparty\flatbuffers\build\VS2010\flatc.vcxproj">
<Project>{5b5857e1-64e2-4ced-a12e-45e1b3880496}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>