Skip to content

Commit

Permalink
visual studio project file updated
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Jun 29, 2020
1 parent 3146e91 commit cd4acb8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 24 deletions.
7 changes: 4 additions & 3 deletions src/ubj/ubjrw.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static UBJ_TYPE compute_best_integer_type(ubjr_dynamic_t* vals, size_t sz)
size_t i;
for (i = 0; i < sz; i++)
{
typemask |= 1UL << ubjw_min_integer_type(vals[i].integer);
typemask |= 1UL << ubjw_min_integer_type(vals[i].data.integer);
}
return typemask2type(typemask);
}
Expand All @@ -36,7 +36,7 @@ static uint32_t compute_best_string_type(ubjr_dynamic_t* vals, size_t sz)
size_t i;
for (i = 0; i < sz; i++)
{
if (strlen(vals[i].string) > 1)
if (strlen(vals[i].data.string) > 1)
{
return UBJ_STRING;
}
Expand All @@ -47,10 +47,11 @@ static UBJ_TYPE optimize_type(UBJ_TYPE typein,ubjr_dynamic_t* vals, size_t sz)
{
static const uint32_t intmask = (1 << UBJ_INT8) | (1 << UBJ_UINT8) | (1 << UBJ_INT16) | (1 << UBJ_INT32) | (1 << UBJ_INT64);
static const uint32_t stringmask = (1 << UBJ_STRING) | (1 << UBJ_CHAR);
uint32_t tm;
if (typein != UBJ_MIXED)
return typein;
//integer optimization can be done here...
uint32_t tm = compute_typemask(vals, sz);
tm = compute_typemask(vals, sz);
if ((tm & intmask) == tm) //if all values are integers
{
return compute_best_integer_type(vals,sz); //calculate the optimum type given the data
Expand Down
11 changes: 2 additions & 9 deletions vsproj/mcx/mcx/mcx.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>zlib.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>
<AdditionalDependencies>zlibstat.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>
<IgnoreSpecificDefaultLibraries>libcmt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
<PostBuildEvent>
<Command>echo copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"
Expand Down Expand Up @@ -231,8 +232,6 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
<ClCompile Include="..\..\..\src\mcx_shapes.c" />
<ClCompile Include="..\..\..\src\mcx_utils.c" />
<ClCompile Include="..\..\..\src\tictoc.c" />
<ClCompile Include="..\..\..\src\ubj\ubjr.c" />
<ClCompile Include="..\..\..\src\ubj\ubjrw.c" />
<ClCompile Include="..\..\..\src\ubj\ubjw.c" />
<ClCompile Include="..\..\..\src\zmat\easylzma\common_internal.c" />
<ClCompile Include="..\..\..\src\zmat\easylzma\compress.c" />
Expand All @@ -257,12 +256,6 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
<ClCompile Include="..\..\..\src\zmat\lz4\lz4hc.c" />
<ClCompile Include="..\..\..\src\zmat\zmatlib.c" />
</ItemGroup>
<ItemGroup>
<Library Include="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\zlibstatic.lib" />
</ItemGroup>
<ItemGroup>
<None Include="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\zlib.dll" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 8.0.targets" />
Expand Down
12 changes: 0 additions & 12 deletions vsproj/mcx/mcx/mcx.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@
<ClCompile Include="..\..\..\src\zmat\easylzma\lzma_header.c">
<Filter>zmat\easylzma</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ubj\ubjr.c">
<Filter>ubj</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ubj\ubjrw.c">
<Filter>ubj</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\ubj\ubjw.c">
<Filter>ubj</Filter>
</ClCompile>
Expand Down Expand Up @@ -196,10 +190,4 @@
<ItemGroup>
<CudaCompile Include="..\..\..\src\mcx_core.cu" />
</ItemGroup>
<ItemGroup>
<Library Include="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\zlibstatic.lib" />
</ItemGroup>
<ItemGroup>
<None Include="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\zlib.dll" />
</ItemGroup>
</Project>

0 comments on commit cd4acb8

Please sign in to comment.