- use expectations
- improved gibbs sampling - LayerArray is template class git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@18 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -218,7 +218,7 @@ private:
|
||||
#else
|
||||
#define JUCE_ATOMICS_WINDOWS 1 // Windows with intrinsics
|
||||
|
||||
#if JUCE_USE_MSVC_INTRINSICS
|
||||
#if JUCE_USE_INTRINSICS
|
||||
#ifndef __INTEL_COMPILER
|
||||
#pragma intrinsic (_InterlockedExchange, _InterlockedIncrement, _InterlockedDecrement, _InterlockedCompareExchange, \
|
||||
_InterlockedCompareExchange64, _InterlockedExchangeAdd, _ReadWriteBarrier)
|
||||
|
||||
@@ -110,13 +110,13 @@ private:
|
||||
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_USE_MSVC_INTRINSICS && ! defined (__INTEL_COMPILER)
|
||||
#if JUCE_USE_INTRINSICS && ! defined (__INTEL_COMPILER)
|
||||
#pragma intrinsic (_byteswap_ulong)
|
||||
#endif
|
||||
|
||||
inline uint16 ByteOrder::swap (uint16 n) noexcept
|
||||
{
|
||||
#if JUCE_USE_MSVC_INTRINSICSxxx // agh - the MS compiler has an internal error when you try to use this intrinsic!
|
||||
#if JUCE_USE_INTRINSICSxxx // agh - the MS compiler has an internal error when you try to use this intrinsic!
|
||||
return static_cast<uint16> (_byteswap_ushort (n));
|
||||
#else
|
||||
return static_cast<uint16> ((n << 8) | (n >> 8));
|
||||
@@ -130,7 +130,7 @@ inline uint32 ByteOrder::swap (uint32 n) noexcept
|
||||
#elif JUCE_GCC && JUCE_INTEL && ! JUCE_NO_INLINE_ASM
|
||||
asm("bswap %%eax" : "=a"(n) : "a"(n));
|
||||
return n;
|
||||
#elif JUCE_USE_MSVC_INTRINSICS
|
||||
#elif JUCE_USE_INTRINSICS
|
||||
return _byteswap_ulong (n);
|
||||
#elif JUCE_MSVC && ! JUCE_NO_INLINE_ASM
|
||||
__asm {
|
||||
@@ -150,7 +150,7 @@ inline uint64 ByteOrder::swap (uint64 value) noexcept
|
||||
{
|
||||
#if JUCE_MAC || JUCE_IOS
|
||||
return OSSwapInt64 (value);
|
||||
#elif JUCE_USE_MSVC_INTRINSICS
|
||||
#elif JUCE_USE_INTRINSICS
|
||||
return _byteswap_uint64 (value);
|
||||
#else
|
||||
return (((int64) swap ((uint32) value)) << 32) | swap ((uint32) (value >> 32));
|
||||
|
||||
@@ -88,14 +88,14 @@ MemoryBlock& MemoryBlock::operator= (const MemoryBlock& other)
|
||||
|
||||
#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS
|
||||
MemoryBlock::MemoryBlock (MemoryBlock&& other) noexcept
|
||||
: data (static_cast<HeapBlock<char>&&> (other.data)),
|
||||
: data (static_cast <HeapBlock<char>&&> (other.data)),
|
||||
size (other.size)
|
||||
{
|
||||
}
|
||||
|
||||
MemoryBlock& MemoryBlock::operator= (MemoryBlock&& other) noexcept
|
||||
{
|
||||
data = static_cast<HeapBlock<char>&&> (other.data);
|
||||
data = static_cast <HeapBlock<char>&&> (other.data);
|
||||
size = other.size;
|
||||
return *this;
|
||||
}
|
||||
@@ -346,7 +346,7 @@ void MemoryBlock::loadFromHexString (StringRef hex)
|
||||
|
||||
if (c == 0)
|
||||
{
|
||||
setSize (static_cast<size_t> (dest - data));
|
||||
setSize (static_cast <size_t> (dest - data));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,11 +182,11 @@ public:
|
||||
/** Swaps this object with that of another ScopedPointer.
|
||||
The two objects simply exchange their pointers.
|
||||
*/
|
||||
void swapWith (ScopedPointer<ObjectType>& other) noexcept
|
||||
void swapWith (ScopedPointer <ObjectType>& other) noexcept
|
||||
{
|
||||
// Two ScopedPointers should never be able to refer to the same object - if
|
||||
// this happens, you must have done something dodgy!
|
||||
jassert (object != other.object || this == other.getAddress() || object == nullptr);
|
||||
jassert (object != other.object || this == other.getAddress());
|
||||
|
||||
std::swap (object, other.object);
|
||||
}
|
||||
@@ -231,7 +231,7 @@ private:
|
||||
template <class ObjectType>
|
||||
bool operator== (const ScopedPointer<ObjectType>& pointer1, ObjectType* const pointer2) noexcept
|
||||
{
|
||||
return static_cast<ObjectType*> (pointer1) == pointer2;
|
||||
return static_cast <ObjectType*> (pointer1) == pointer2;
|
||||
}
|
||||
|
||||
/** Compares a ScopedPointer with another pointer.
|
||||
@@ -240,7 +240,7 @@ bool operator== (const ScopedPointer<ObjectType>& pointer1, ObjectType* const po
|
||||
template <class ObjectType>
|
||||
bool operator!= (const ScopedPointer<ObjectType>& pointer1, ObjectType* const pointer2) noexcept
|
||||
{
|
||||
return static_cast<ObjectType*> (pointer1) != pointer2;
|
||||
return static_cast <ObjectType*> (pointer1) != pointer2;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
public:
|
||||
Master() noexcept {}
|
||||
|
||||
~Master() noexcept
|
||||
~Master()
|
||||
{
|
||||
// You must remember to call clear() in your source object's destructor! See the notes
|
||||
// for the WeakReference class for an example of how to do this.
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
to zero all the references to this object that may be out there. See the WeakReference
|
||||
class notes for an example of how to do this.
|
||||
*/
|
||||
void clear() noexcept
|
||||
void clear()
|
||||
{
|
||||
if (sharedPointer != nullptr)
|
||||
sharedPointer->clearPointer();
|
||||
|
||||
Reference in New Issue
Block a user