Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Windows Compatibility #183

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
minimum windows compatibility
  • Loading branch information
happynear committed Sep 29, 2015
commit abc44961350ec2de88db4236af8c7856982e0a96
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,14 @@ mshadow
data
recommonmark
bin

# msvc
*.pdb
*.sdf
*.opensdf
*.deps
*.cache
*.exp
*.lib
*.dll
mxnet.egg-info/
6 changes: 4 additions & 2 deletions example/mnist/data.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# pylint: skip-file
""" data iterator for mnist """
import sys
sys.path.insert(0, "../../python/")
sys.path.append("../../tests/python/common")
import os
curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
sys.path.insert(0, os.path.join(curr_path, "../../python/"))
sys.path.append(os.path.join(curr_path, "../../tests/python/common"))
import get_data
import mxnet as mx

Expand Down
5 changes: 3 additions & 2 deletions python/mxnet/libinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import absolute_import
import os
import platform
solution_configuration = "Release"

def find_lib_path():
"""Find MXNet dynamic library files.
Expand All @@ -17,9 +18,9 @@ def find_lib_path():
dll_path = [curr_path, api_path]
if os.name == 'nt':
if platform.architecture()[0] == '64bit':
dll_path.append(os.path.join(api_path, '../../windows/x64/Release/'))
dll_path.append(os.path.join(curr_path, '../../windows/x64', solution_configuration))
else:
dll_path.append(os.path.join(api_path, '../../windows/Release/'))
dll_path.append(os.path.join(curr_path, '../../windows', solution_configuration))
if os.name == 'nt':
dll_path = [os.path.join(p, 'mxnet.dll') for p in dll_path]
else:
Expand Down
5 changes: 5 additions & 0 deletions src/common/object_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,13 @@ void ObjectPool<T>::AllocateChunk() {
static_assert(alignof(LinkedList) % alignof(T) == 0, "ObjectPooll Invariant");
static_assert(kPageSize % alignof(LinkedList) == 0, "ObjectPooll Invariant");
void* new_chunk_ptr;
#ifdef _MSC_VER
new_chunk_ptr = _aligned_malloc(kPageSize, kPageSize);
CHECK_NE(new_chunk_ptr, NULL) << "Allocation failed";
#else
int ret = posix_memalign(&new_chunk_ptr, kPageSize, kPageSize);
CHECK_EQ(ret, 0) << "Allocation failed";
#endif
allocated_.emplace_back(new_chunk_ptr);
auto new_chunk = static_cast<LinkedList*>(new_chunk_ptr);
auto size = kPageSize / sizeof(LinkedList);
Expand Down
3 changes: 3 additions & 0 deletions src/io/image_augmenter.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ class ImageAugmenter {
}
}
#if MXNET_USE_OPENCV
#ifdef _MSC_VER
#define M_PI CV_PI
#endif
/*!
* \brief augment src image, store result into dst
* this function is not thread safe, and will only be called by one thread
Expand Down
4 changes: 4 additions & 0 deletions src/io/iter_mnist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@ class MNISTIter: public IIterator<TBlobBatch> {
unsigned char buf[4];
CHECK(fi->Read(buf, sizeof(buf)) == sizeof(buf))
<< "invalid mnist format";
#ifdef _MSC_VER
return (buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3]);
#else
return reinterpret_cast<int>(buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3]);
#endif
}

private:
Expand Down
12 changes: 10 additions & 2 deletions src/storage/cpu_device_storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ class CPUDeviceStorage {

inline void* CPUDeviceStorage::Alloc(size_t size) {
#if _MSC_VER
return CHECK_NOTNULL(_aligned_malloc(size, alignment_));
void* ptr;
ptr = _aligned_malloc(size, alignment_);
return CHECK_NOTNULL(ptr);
#else
void* ptr;
int ret = posix_memalign(&ptr, alignment_, size);
Expand All @@ -48,7 +50,13 @@ inline void* CPUDeviceStorage::Alloc(size_t size) {
#endif
}

inline void CPUDeviceStorage::Free(void* ptr) { free(ptr); }
inline void CPUDeviceStorage::Free(void* ptr) {
#if _MSC_VER
_aligned_free(ptr);
#else
free(ptr);
#endif
}

} // namespace storage
} // namespace mxnet
Expand Down
162 changes: 162 additions & 0 deletions windows/im2rec/im2rec.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.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="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\tools\im2rec.cc" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{CF267D06-BE5D-4303-A013-33BBC076809F}</ProjectGuid>
<RootNamespace>im2rec</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 7.0.props" />
</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)'=='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|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|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)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>echo copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"
copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>echo copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"
copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
<CudaCompile>
<TargetMachinePlatform>64</TargetMachinePlatform>
</CudaCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>echo copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"
copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../../dmlc-core/include;../../mshadow;../../include;D:\deepLearning\caffe-windows\3rdparty\include;%(AdditionalIncludeDirectories);$(CudaToolkitIncludeDir)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>dmlc.lib;mxnet.lib;opencv_world300.lib;cudart.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>D:\deepLearning\caffe-windows\3rdparty\lib;..\..\windows\x64\Release;%(AdditionalLibraryDirectories);$(CudaToolkitLibDir)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
<CudaCompile>
<TargetMachinePlatform>64</TargetMachinePlatform>
</CudaCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 7.0.targets" />
</ImportGroup>
</Project>
80 changes: 80 additions & 0 deletions windows/mxnet.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mxnet", "mxnet\mxnet.vcxproj", "{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dmlc", "..\dmlc-core\windows\dmlc\dmlc.vcxproj", "{6E6DDA36-69BA-4555-BA88-10166B11F2D2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "im2rec", "im2rec\im2rec.vcxproj", "{CF267D06-BE5D-4303-A013-33BBC076809F}"
EndProject
Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "python", "python\python.pyproj", "{1FC98FC2-84C9-4253-85B5-7BCC90D8F2E4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Debug|Any CPU.ActiveCfg = Debug|Win32
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Debug|Win32.ActiveCfg = Debug|Win32
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Debug|Win32.Build.0 = Debug|Win32
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Debug|x64.ActiveCfg = Debug|x64
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Debug|x64.Build.0 = Debug|x64
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Release|Any CPU.ActiveCfg = Release|Win32
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Release|Mixed Platforms.Build.0 = Release|Win32
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Release|Win32.ActiveCfg = Release|Win32
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Release|Win32.Build.0 = Release|Win32
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Release|x64.ActiveCfg = Release|x64
{15D3B5AC-7EF8-422E-BB67-69F06BA394C3}.Release|x64.Build.0 = Release|x64
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Debug|Any CPU.ActiveCfg = Debug|Win32
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Debug|Win32.ActiveCfg = Debug|Win32
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Debug|Win32.Build.0 = Debug|Win32
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Debug|x64.ActiveCfg = Debug|x64
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Debug|x64.Build.0 = Debug|x64
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Release|Any CPU.ActiveCfg = Release|Win32
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Release|Mixed Platforms.Build.0 = Release|Win32
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Release|Win32.ActiveCfg = Release|Win32
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Release|Win32.Build.0 = Release|Win32
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Release|x64.ActiveCfg = Release|x64
{6E6DDA36-69BA-4555-BA88-10166B11F2D2}.Release|x64.Build.0 = Release|x64
{CF267D06-BE5D-4303-A013-33BBC076809F}.Debug|Any CPU.ActiveCfg = Debug|Win32
{CF267D06-BE5D-4303-A013-33BBC076809F}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{CF267D06-BE5D-4303-A013-33BBC076809F}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{CF267D06-BE5D-4303-A013-33BBC076809F}.Debug|Win32.ActiveCfg = Debug|Win32
{CF267D06-BE5D-4303-A013-33BBC076809F}.Debug|Win32.Build.0 = Debug|Win32
{CF267D06-BE5D-4303-A013-33BBC076809F}.Debug|x64.ActiveCfg = Debug|x64
{CF267D06-BE5D-4303-A013-33BBC076809F}.Debug|x64.Build.0 = Debug|x64
{CF267D06-BE5D-4303-A013-33BBC076809F}.Release|Any CPU.ActiveCfg = Release|Win32
{CF267D06-BE5D-4303-A013-33BBC076809F}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{CF267D06-BE5D-4303-A013-33BBC076809F}.Release|Mixed Platforms.Build.0 = Release|Win32
{CF267D06-BE5D-4303-A013-33BBC076809F}.Release|Win32.ActiveCfg = Release|Win32
{CF267D06-BE5D-4303-A013-33BBC076809F}.Release|Win32.Build.0 = Release|Win32
{CF267D06-BE5D-4303-A013-33BBC076809F}.Release|x64.ActiveCfg = Release|x64
{CF267D06-BE5D-4303-A013-33BBC076809F}.Release|x64.Build.0 = Release|x64
{1FC98FC2-84C9-4253-85B5-7BCC90D8F2E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FC98FC2-84C9-4253-85B5-7BCC90D8F2E4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{1FC98FC2-84C9-4253-85B5-7BCC90D8F2E4}.Debug|Win32.ActiveCfg = Debug|Any CPU
{1FC98FC2-84C9-4253-85B5-7BCC90D8F2E4}.Debug|x64.ActiveCfg = Debug|Any CPU
{1FC98FC2-84C9-4253-85B5-7BCC90D8F2E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1FC98FC2-84C9-4253-85B5-7BCC90D8F2E4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{1FC98FC2-84C9-4253-85B5-7BCC90D8F2E4}.Release|Win32.ActiveCfg = Release|Any CPU
{1FC98FC2-84C9-4253-85B5-7BCC90D8F2E4}.Release|x64.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Loading