From e2b7675e9c9513f7e33e2d6c36617bd4940e4288 Mon Sep 17 00:00:00 2001 From: raver119 Date: Sat, 3 Aug 2019 09:15:12 +0300 Subject: [PATCH] build fix Signed-off-by: raver119 --- .../ops/declarable/helpers/cuda/gradient.cu | 2 +- .../java/org/nd4j/nativeblas/Nd4jCpu.java | 20 ++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/libnd4j/include/ops/declarable/helpers/cuda/gradient.cu b/libnd4j/include/ops/declarable/helpers/cuda/gradient.cu index a8fc34897..86f5b4d5a 100644 --- a/libnd4j/include/ops/declarable/helpers/cuda/gradient.cu +++ b/libnd4j/include/ops/declarable/helpers/cuda/gradient.cu @@ -25,7 +25,7 @@ namespace nd4j { namespace ops { namespace helpers { template -static void applyGradientDescent_(LaunchContext* context, NDArray* input, NDArray* step, double weight, NDArray* output) { +void applyGradientDescent_(LaunchContext* context, NDArray* input, NDArray* step, double weight, NDArray* output) { auto lambda = LAMBDA_TT(_x, _y, weight) { return _x - (_y * weight); }; diff --git a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/nativeblas/Nd4jCpu.java b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/nativeblas/Nd4jCpu.java index 858108705..9d6292106 100644 --- a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/nativeblas/Nd4jCpu.java +++ b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/nativeblas/Nd4jCpu.java @@ -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); /** @@ -20153,7 +20159,7 @@ public static final int TAD_THRESHOLD = TAD_THRESHOLD(); * CAUTION: either size tensor or a pair of int params should be provided. */ -// #if NOT_EXCLUDED(OP_resize_bilinear) +// #if NOT_EXCLUDED(OP_resize_nearest_neighbor) @Namespace("nd4j::ops") public static class resize_nearest_neighbor extends DeclarableCustomOp { static { Loader.load(); } /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ @@ -20982,7 +20988,7 @@ public static final int TAD_THRESHOLD = TAD_THRESHOLD(); public native ShapeList calculateOutputShape(ShapeList inputShape, @ByRef Context block); } // #endif -// #if NOT_EXCLUDED(OP_batchnorm) +// #if NOT_EXCLUDED(OP_batchnorm_new) @Namespace("nd4j::ops") public static class batchnorm_new extends DeclarableCustomOp { static { Loader.load(); } /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */