Skip to content

Commit

Permalink
Update presets to match latest changes in JavaCPP
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Aug 1, 2015
1 parent 0bc27ae commit 399b278
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 55 deletions.
40 changes: 20 additions & 20 deletions caffe/src/main/java/org/bytedeco/javacpp/caffe.java
Original file line number Diff line number Diff line change
Expand Up @@ -12732,7 +12732,7 @@ public thread() { }
*
* TODO(dox): thorough documentation for Forward and proto params.
*/
@Name("caffe::BaseDataLayer<float>") @NoOffset public static abstract class FloatBaseDataLayer extends FloatLayer {
@Name("caffe::BaseDataLayer<float>") @NoOffset public static class FloatBaseDataLayer extends FloatLayer {
static { Loader.load(); }
/** Empty constructor. */
public FloatBaseDataLayer() { }
Expand All @@ -12757,7 +12757,7 @@ public FloatBaseDataLayer() { }
@Virtual public native void Backward_gpu(@Const @ByRef FloatBlobVector top,
@Const @ByRef BoolVector propagate_down, @Const @ByRef FloatBlobVector bottom);
}
@Name("caffe::BaseDataLayer<double>") @NoOffset public static abstract class DoubleBaseDataLayer extends DoubleLayer {
@Name("caffe::BaseDataLayer<double>") @NoOffset public static class DoubleBaseDataLayer extends DoubleLayer {
static { Loader.load(); }
/** Empty constructor. */
public DoubleBaseDataLayer() { }
Expand Down Expand Up @@ -13423,7 +13423,7 @@ private native void allocate(@StdString String type,
* gradients with respect to their input Blob%s, given the error gradients with
* their output Blob%s.
*/
@Name("caffe::Layer<float>") @NoOffset public static abstract class FloatLayer extends Pointer {
@Name("caffe::Layer<float>") @NoOffset public static class FloatLayer extends Pointer {
static { Loader.load(); }
/** Empty constructor. */
public FloatLayer() { }
Expand Down Expand Up @@ -13483,7 +13483,7 @@ public native void SetUp(@Const @ByRef FloatBlobVector bottom,
* and making any other necessary adjustments so that the layer can
* accomodate the bottom blobs.
*/
@Virtual public abstract void Reshape(@Const @ByRef FloatBlobVector bottom,
@Virtual public native void Reshape(@Const @ByRef FloatBlobVector bottom,
@Const @ByRef FloatBlobVector top);

/**
Expand Down Expand Up @@ -13651,11 +13651,11 @@ public native void Backward(@Const @ByRef FloatBlobVector top,
* parameter at a particular index given by param_id.
*/
public native void set_param_propagate_down(int param_id, @Cast("const bool") boolean value);
@Virtual protected abstract void Forward_cpu(@Const @ByRef FloatBlobVector bottom,
@Virtual protected native void Forward_cpu(@Const @ByRef FloatBlobVector bottom,
@Const @ByRef FloatBlobVector top);
@Virtual protected native void Forward_gpu(@Const @ByRef FloatBlobVector bottom,
@Const @ByRef FloatBlobVector top);
@Virtual protected abstract void Backward_cpu(@Const @ByRef FloatBlobVector top,
@Virtual protected native void Backward_cpu(@Const @ByRef FloatBlobVector top,
@Const @ByRef BoolVector propagate_down,
@Const @ByRef FloatBlobVector bottom);
@Virtual protected native void Backward_gpu(@Const @ByRef FloatBlobVector top,
Expand All @@ -13664,7 +13664,7 @@ public native void Backward(@Const @ByRef FloatBlobVector top,
@Virtual protected native void CheckBlobCounts(@Const @ByRef FloatBlobVector bottom,
@Const @ByRef FloatBlobVector top);
}
@Name("caffe::Layer<double>") @NoOffset public static abstract class DoubleLayer extends Pointer {
@Name("caffe::Layer<double>") @NoOffset public static class DoubleLayer extends Pointer {
static { Loader.load(); }
/** Empty constructor. */
public DoubleLayer() { }
Expand Down Expand Up @@ -13724,7 +13724,7 @@ public native void SetUp(@Const @ByRef DoubleBlobVector bottom,
* and making any other necessary adjustments so that the layer can
* accomodate the bottom blobs.
*/
@Virtual public abstract void Reshape(@Const @ByRef DoubleBlobVector bottom,
@Virtual public native void Reshape(@Const @ByRef DoubleBlobVector bottom,
@Const @ByRef DoubleBlobVector top);

/**
Expand Down Expand Up @@ -13892,11 +13892,11 @@ public native void Backward(@Const @ByRef DoubleBlobVector top,
* parameter at a particular index given by param_id.
*/
public native void set_param_propagate_down(int param_id, @Cast("const bool") boolean value);
@Virtual protected abstract void Forward_cpu(@Const @ByRef DoubleBlobVector bottom,
@Virtual protected native void Forward_cpu(@Const @ByRef DoubleBlobVector bottom,
@Const @ByRef DoubleBlobVector top);
@Virtual protected native void Forward_gpu(@Const @ByRef DoubleBlobVector bottom,
@Const @ByRef DoubleBlobVector top);
@Virtual protected abstract void Backward_cpu(@Const @ByRef DoubleBlobVector top,
@Virtual protected native void Backward_cpu(@Const @ByRef DoubleBlobVector top,
@Const @ByRef BoolVector propagate_down,
@Const @ByRef DoubleBlobVector bottom);
@Virtual protected native void Backward_gpu(@Const @ByRef DoubleBlobVector top,
Expand Down Expand Up @@ -14011,7 +14011,7 @@ public DoubleAccuracyLayer() { }
* LossLayers are typically only capable of backpropagating to their first input
* -- the predictions.
*/
@Name("caffe::LossLayer<float>") public static abstract class FloatLossLayer extends FloatLayer {
@Name("caffe::LossLayer<float>") public static class FloatLossLayer extends FloatLayer {
static { Loader.load(); }
/** Empty constructor. */
public FloatLossLayer() { }
Expand Down Expand Up @@ -14041,7 +14041,7 @@ public FloatLossLayer() { }
*/
@Virtual public native @Cast("bool") boolean AllowForceBackward(int bottom_index);
}
@Name("caffe::LossLayer<double>") public static abstract class DoubleLossLayer extends DoubleLayer {
@Name("caffe::LossLayer<double>") public static class DoubleLossLayer extends DoubleLayer {
static { Loader.load(); }
/** Empty constructor. */
public DoubleLossLayer() { }
Expand Down Expand Up @@ -14666,7 +14666,7 @@ public DoubleSoftmaxWithLossLayer() { }
* each element of the output depends only on the corresponding input
* element.
*/
@Name("caffe::NeuronLayer<float>") public static abstract class FloatNeuronLayer extends FloatLayer {
@Name("caffe::NeuronLayer<float>") public static class FloatNeuronLayer extends FloatLayer {
static { Loader.load(); }
/** Empty constructor. */
public FloatNeuronLayer() { }
Expand All @@ -14681,7 +14681,7 @@ public FloatNeuronLayer() { }
@Virtual public native int ExactNumBottomBlobs();
@Virtual public native int ExactNumTopBlobs();
}
@Name("caffe::NeuronLayer<double>") public static abstract class DoubleNeuronLayer extends DoubleLayer {
@Name("caffe::NeuronLayer<double>") public static class DoubleNeuronLayer extends DoubleLayer {
static { Loader.load(); }
/** Empty constructor. */
public DoubleNeuronLayer() { }
Expand Down Expand Up @@ -16508,7 +16508,7 @@ public DoubleAdaGradSolver() { }
* @brief Abstract base class that factors out the BLAS code common to
* ConvolutionLayer and DeconvolutionLayer.
*/
@Name("caffe::BaseConvolutionLayer<float>") @NoOffset public static abstract class FloatBaseConvolutionLayer extends FloatLayer {
@Name("caffe::BaseConvolutionLayer<float>") @NoOffset public static class FloatBaseConvolutionLayer extends FloatLayer {
static { Loader.load(); }
/** Empty constructor. */
public FloatBaseConvolutionLayer() { }
Expand All @@ -16523,10 +16523,10 @@ public FloatBaseConvolutionLayer() { }
@Virtual public native int MinBottomBlobs();
@Virtual public native int MinTopBlobs();
@Virtual public native @Cast("bool") boolean EqualNumBottomTopBlobs();
@Virtual protected abstract @Cast("bool") boolean reverse_dimensions();
@Virtual protected abstract void compute_output_shape();
@Virtual protected native @Cast("bool") boolean reverse_dimensions();
@Virtual protected native void compute_output_shape();
}
@Name("caffe::BaseConvolutionLayer<double>") @NoOffset public static abstract class DoubleBaseConvolutionLayer extends DoubleLayer {
@Name("caffe::BaseConvolutionLayer<double>") @NoOffset public static class DoubleBaseConvolutionLayer extends DoubleLayer {
static { Loader.load(); }
/** Empty constructor. */
public DoubleBaseConvolutionLayer() { }
Expand All @@ -16541,8 +16541,8 @@ public DoubleBaseConvolutionLayer() { }
@Virtual public native int MinBottomBlobs();
@Virtual public native int MinTopBlobs();
@Virtual public native @Cast("bool") boolean EqualNumBottomTopBlobs();
@Virtual protected abstract @Cast("bool") boolean reverse_dimensions();
@Virtual protected abstract void compute_output_shape();
@Virtual protected native @Cast("bool") boolean reverse_dimensions();
@Virtual protected native void compute_output_shape();
}

/**
Expand Down
4 changes: 2 additions & 2 deletions cuda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Java API documentation is available here:

Sample Usage
------------
Here is a simple example of CUDNN ported to Java from the `mnistCUDNN.cpp` sample file included in `cudnn-sample-v2.tgz` available at:
Here is a simple example of cuDNN ported to Java from the `mnistCUDNN.cpp` sample file included in `cudnn-sample-v2.tgz` available at:

* https://developer.nvidia.com/cuDNN
* https://developer.nvidia.com/cudnn

We can use [Maven 3](http://maven.apache.org/) to download and install automatically all the class files as well as the native binaries. To run this sample code, after creating the `pom.xml` and `src/main/java/MNISTCUDNN.java` source files below, simply execute on the command line:
```bash
Expand Down
6 changes: 3 additions & 3 deletions opencv/src/main/java/org/bytedeco/javacpp/opencv_core.java
Original file line number Diff line number Diff line change
Expand Up @@ -17335,7 +17335,7 @@ public MinProblemSolver() { }

/** @brief Represents function being optimized
*/
@Const public static abstract class Function extends Pointer {
@Const public static class Function extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public Function() { allocate(); }
Expand All @@ -17349,9 +17349,9 @@ public MinProblemSolver() { }
return (Function)super.position(position);
}

@Virtual public abstract int getDims();
@Virtual public native int getDims();
@Virtual public native double getGradientEps();
@Virtual public abstract double calc(@Const DoublePointer x);
@Virtual public native double calc(@Const DoublePointer x);
@Virtual public native void getGradient(@Const DoublePointer x,DoublePointer grad);
}

Expand Down
60 changes: 30 additions & 30 deletions tesseract/src/main/java/org/bytedeco/javacpp/tesseract.java
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ public TessClosure() { }
// #ifndef SWIG
// #endif

@Name("TessCallback1<char>") public static abstract class CharClearCallback extends Pointer {
@Name("TessCallback1<char>") public static class CharClearCallback extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public CharClearCallback() { allocate(); }
Expand All @@ -723,10 +723,10 @@ public TessClosure() { }
return (CharClearCallback)super.position(position);
}

@Virtual public abstract void Run(@Cast("char") byte arg0);
@Virtual public native void Run(@Cast("char") byte arg0);
}

@Name("TessCallback1<STRING>") public static abstract class StringClearCallback extends Pointer {
@Name("TessCallback1<STRING>") public static class StringClearCallback extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public StringClearCallback() { allocate(); }
Expand All @@ -740,10 +740,10 @@ public TessClosure() { }
return (StringClearCallback)super.position(position);
}

@Virtual public abstract void Run(@ByVal STRING arg0);
@Virtual public native void Run(@ByVal STRING arg0);
}

@Name("TessCallback1<int>") public static abstract class IntClearCallback extends Pointer {
@Name("TessCallback1<int>") public static class IntClearCallback extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public IntClearCallback() { allocate(); }
Expand All @@ -757,10 +757,10 @@ public TessClosure() { }
return (IntClearCallback)super.position(position);
}

@Virtual public abstract void Run(int arg0);
@Virtual public native void Run(int arg0);
}

@Name("TessResultCallback1<bool,int>") public static abstract class DeleteCallback extends Pointer {
@Name("TessResultCallback1<bool,int>") public static class DeleteCallback extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public DeleteCallback() { allocate(); }
Expand All @@ -774,10 +774,10 @@ public TessClosure() { }
return (DeleteCallback)super.position(position);
}

@Virtual public abstract @Cast("bool") boolean Run(int arg0);
@Virtual public native @Cast("bool") boolean Run(int arg0);
}

@Name("TessResultCallback2<bool,char const&,char const&>") public static abstract class CharCompareCallback extends Pointer {
@Name("TessResultCallback2<bool,char const&,char const&>") public static class CharCompareCallback extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public CharCompareCallback() { allocate(); }
Expand All @@ -791,10 +791,10 @@ public TessClosure() { }
return (CharCompareCallback)super.position(position);
}

@Virtual public abstract @Cast("bool") boolean Run(@Cast("char const*") @ByRef BytePointer arg0,@Cast("char const*") @ByRef BytePointer arg1);
@Virtual public native @Cast("bool") boolean Run(@Cast("char const*") @ByRef BytePointer arg0,@Cast("char const*") @ByRef BytePointer arg1);
}

@Name("TessResultCallback2<bool,FILE*,char const&>") public static abstract class CharWriteCallback extends Pointer {
@Name("TessResultCallback2<bool,FILE*,char const&>") public static class CharWriteCallback extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public CharWriteCallback() { allocate(); }
Expand All @@ -808,10 +808,10 @@ public TessClosure() { }
return (CharWriteCallback)super.position(position);
}

@Virtual public abstract @Cast("bool") boolean Run(@Cast("FILE*") Pointer arg0,@Cast("char const*") @ByRef BytePointer arg1);
@Virtual public native @Cast("bool") boolean Run(@Cast("FILE*") Pointer arg0,@Cast("char const*") @ByRef BytePointer arg1);
}

@Name("TessResultCallback2<bool,STRING const&,STRING const&>") public static abstract class StringCompareCallback extends Pointer {
@Name("TessResultCallback2<bool,STRING const&,STRING const&>") public static class StringCompareCallback extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public StringCompareCallback() { allocate(); }
Expand All @@ -825,10 +825,10 @@ public TessClosure() { }
return (StringCompareCallback)super.position(position);
}

@Virtual public abstract @Cast("bool") boolean Run(@Const({false, true}) @ByRef STRING arg0,@Const({false, true}) @ByRef STRING arg1);
@Virtual public native @Cast("bool") boolean Run(@Const({false, true}) @ByRef STRING arg0,@Const({false, true}) @ByRef STRING arg1);
}

@Name("TessResultCallback2<bool,FILE*,STRING const&>") public static abstract class StringWriteCallback extends Pointer {
@Name("TessResultCallback2<bool,FILE*,STRING const&>") public static class StringWriteCallback extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public StringWriteCallback() { allocate(); }
Expand All @@ -842,10 +842,10 @@ public TessClosure() { }
return (StringWriteCallback)super.position(position);
}

@Virtual public abstract @Cast("bool") boolean Run(@Cast("FILE*") Pointer arg0,@Const({false, true}) @ByRef STRING arg1);
@Virtual public native @Cast("bool") boolean Run(@Cast("FILE*") Pointer arg0,@Const({false, true}) @ByRef STRING arg1);
}

@Name("TessResultCallback2<bool,int const&,int const&>") public static abstract class IntCompareCallback extends Pointer {
@Name("TessResultCallback2<bool,int const&,int const&>") public static class IntCompareCallback extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public IntCompareCallback() { allocate(); }
Expand All @@ -859,10 +859,10 @@ public TessClosure() { }
return (IntCompareCallback)super.position(position);
}

@Virtual public abstract @Cast("bool") boolean Run(@Const({false, true}) @ByRef IntPointer arg0,@Const({false, true}) @ByRef IntPointer arg1);
@Virtual public native @Cast("bool") boolean Run(@Const({false, true}) @ByRef IntPointer arg0,@Const({false, true}) @ByRef IntPointer arg1);
}

@Name("TessResultCallback2<bool,FILE*,int const&>") public static abstract class IntWriteCallback extends Pointer {
@Name("TessResultCallback2<bool,FILE*,int const&>") public static class IntWriteCallback extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public IntWriteCallback() { allocate(); }
Expand All @@ -876,10 +876,10 @@ public TessClosure() { }
return (IntWriteCallback)super.position(position);
}

@Virtual public abstract @Cast("bool") boolean Run(@Cast("FILE*") Pointer arg0,@Const({false, true}) @ByRef IntPointer arg1);
@Virtual public native @Cast("bool") boolean Run(@Cast("FILE*") Pointer arg0,@Const({false, true}) @ByRef IntPointer arg1);
}

@Name("TessCallback3<const UNICHARSET&,int,PAGE_RES*>") public static abstract class TruthCallback3 extends Pointer {
@Name("TessCallback3<const UNICHARSET&,int,PAGE_RES*>") public static class TruthCallback3 extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public TruthCallback3() { allocate(); }
Expand All @@ -893,10 +893,10 @@ public TessClosure() { }
return (TruthCallback3)super.position(position);
}

@Virtual public abstract void Run(@Const @ByRef UNICHARSET arg0,int arg1,PAGE_RES arg2);
@Virtual public native void Run(@Const @ByRef UNICHARSET arg0,int arg1,PAGE_RES arg2);
}

@Name("TessResultCallback3<bool,FILE*,char*,bool>") public static abstract class CharReadCallback extends Pointer {
@Name("TessResultCallback3<bool,FILE*,char*,bool>") public static class CharReadCallback extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public CharReadCallback() { allocate(); }
Expand All @@ -910,10 +910,10 @@ public TessClosure() { }
return (CharReadCallback)super.position(position);
}

@Virtual public abstract @Cast("bool") boolean Run(@Cast("FILE*") Pointer arg0,@Cast("char*") BytePointer arg1,@Cast("bool") boolean arg2);
@Virtual public native @Cast("bool") boolean Run(@Cast("FILE*") Pointer arg0,@Cast("char*") BytePointer arg1,@Cast("bool") boolean arg2);
}

@Name("TessResultCallback3<bool,FILE*,STRING*,bool>") public static abstract class StringReadCallback extends Pointer {
@Name("TessResultCallback3<bool,FILE*,STRING*,bool>") public static class StringReadCallback extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public StringReadCallback() { allocate(); }
Expand All @@ -927,10 +927,10 @@ public TessClosure() { }
return (StringReadCallback)super.position(position);
}

@Virtual public abstract @Cast("bool") boolean Run(@Cast("FILE*") Pointer arg0,STRING arg1,@Cast("bool") boolean arg2);
@Virtual public native @Cast("bool") boolean Run(@Cast("FILE*") Pointer arg0,STRING arg1,@Cast("bool") boolean arg2);
}

@Name("TessResultCallback3<bool,FILE*,int*,bool>") public static abstract class IntReadCallback extends Pointer {
@Name("TessResultCallback3<bool,FILE*,int*,bool>") public static class IntReadCallback extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public IntReadCallback() { allocate(); }
Expand All @@ -944,10 +944,10 @@ public TessClosure() { }
return (IntReadCallback)super.position(position);
}

@Virtual public abstract @Cast("bool") boolean Run(@Cast("FILE*") Pointer arg0,IntPointer arg1,@Cast("bool") boolean arg2);
@Virtual public native @Cast("bool") boolean Run(@Cast("FILE*") Pointer arg0,IntPointer arg1,@Cast("bool") boolean arg2);
}

@Name("TessCallback4<const UNICHARSET&,int,tesseract::PageIterator*,Pix*>") public static abstract class TruthCallback4 extends Pointer {
@Name("TessCallback4<const UNICHARSET&,int,tesseract::PageIterator*,Pix*>") public static class TruthCallback4 extends Pointer {
static { Loader.load(); }
/** Default native constructor. */
public TruthCallback4() { allocate(); }
Expand All @@ -961,7 +961,7 @@ public TessClosure() { }
return (TruthCallback4)super.position(position);
}

@Virtual public abstract void Run(@Const @ByRef UNICHARSET arg0,int arg1,PageIterator arg2,PIX arg3);
@Virtual public native void Run(@Const @ByRef UNICHARSET arg0,int arg1,PageIterator arg2,PIX arg3);
}

// #ifndef SWIG
Expand Down

0 comments on commit 399b278

Please sign in to comment.