exclude two methods for JNI

Signed-off-by: raver119 <raver119@gmail.com>
master
raver119 2019-08-03 13:23:12 +03:00 committed by AlexDBlack
parent e2b7675e9c
commit aefdbc17d6
4 changed files with 23 additions and 5 deletions

View File

@ -261,6 +261,7 @@ namespace nd4j {
void syncToDevice() const;
void syncShape() const;
#ifndef __JAVACPP_HACK__ && !defined(_JNI_IMPLEMENTATION_)
/**
* This method can be used on architectures that use special buffers
* @param writeList
@ -272,6 +273,8 @@ namespace nd4j {
static void registerPrimaryUse(const std::vector<const NDArray*>& writeList, const std::vector<const NDArray*>& readList);
static void preparePrimaryUse(const std::vector<const NDArray*>& writeList, const std::vector<const NDArray*>& readList, bool synchronizeWritables = false);
#endif
/**
* This method returns buffer pointer offset by given number of elements, wrt own data type
* @param offset

View File

@ -181,6 +181,8 @@ void NDArray::swapUnsafe(NDArray& other) {
void NDArray::synchronize(const char* msg) const {
// no-op
}
#ifndef __JAVACPP_HACK__ && !defined(_JNI_IMPLEMENTATION_)
void NDArray::prepareSpecialUse(const std::vector<const NDArray*>& writeList, const std::vector<const NDArray*>& readList, bool synchronizeWritables) {
// no-op
}
@ -193,6 +195,9 @@ void NDArray::preparePrimaryUse(const std::vector<const NDArray*>& writeList, co
void NDArray::registerPrimaryUse(const std::vector<const NDArray*>& writeList, const std::vector<const NDArray*>& readList) {
// no-op
}
#endif
void NDArray::syncShape() const {
// no-op
}

View File

@ -230,6 +230,8 @@ void NDArray::synchronize(const char* msg) const {
if (res != 0)
throw std::runtime_error(msg + std::string(": synchronization failed !"));
}
#ifndef __JAVACPP_HACK__ && !defined(_JNI_IMPLEMENTATION_)
////////////////////////////////////////////////////////////////////////
void NDArray::prepareSpecialUse(const std::vector<const NDArray*>& writeList, const std::vector<const NDArray*>& readList, bool synchronizeWritables) {
@ -286,6 +288,8 @@ void NDArray::registerPrimaryUse(const std::vector<const NDArray*>& writeList, c
p->tickWriteHost();
}
#endif
//////////////////////////////////////////////////////////////////////////
void NDArray::syncShape() const {
cudaMemcpy(getSpecialShapeInfo(), getShapeInfo(), shape::shapeInfoByteLength(getShapeInfo()), cudaMemcpyHostToDevice);

View File

@ -3814,11 +3814,9 @@ public native @Cast("char*") String runFullBenchmarkSuit(@Cast("bool") boolean p
public native void syncToDevice();
public native void syncShape();
/**
* This method can be used on architectures that use special buffers
* @param writeList
* @param readList
*/
// #ifndef __JAVACPP_HACK__
// #endif
/**
* This method returns buffer pointer offset by given number of elements, wrt own data type
@ -4056,6 +4054,7 @@ public native @Cast("char*") String runFullBenchmarkSuit(@Cast("bool") boolean p
/**
* this method assigns values of given array to this one
*/
public native void assign(@Const NDArray other, @Cast("bool") boolean allowParallelism/*=true*/);
public native void assign(@Const NDArray other);
/**
@ -4065,12 +4064,19 @@ public native @Cast("char*") String runFullBenchmarkSuit(@Cast("bool") boolean p
/**
* this method assigns given value to all elements in array
*/
public native void assign(double value, @Cast("bool") boolean allowParallelism/*=true*/);
public native void assign(double value);
public native void assign(float value, @Cast("bool") boolean allowParallelism/*=true*/);
public native void assign(float value);
public native void assign(@Cast("const float16") short value, @Cast("bool") boolean allowParallelism/*=true*/);
public native void assign(@Cast("const float16") short value);
public native void assign(@Cast("const Nd4jLong") long value, @Cast("bool") boolean allowParallelism/*=true*/);
public native void assign(@Cast("const Nd4jLong") long value);
public native void assign(int value, @Cast("bool") boolean allowParallelism/*=true*/);
public native void assign(int value);
public native void assign(@Cast("const uint8_t") byte value, @Cast("bool") boolean allowParallelism/*=true*/);
public native void assign(@Cast("const uint8_t") byte value);
public native void assign(@Cast("const bool") boolean value, @Cast("bool") boolean allowParallelism/*=true*/);
public native void assign(@Cast("const bool") boolean value);
/**