当前位置: 首页>>代码示例>>Java>>正文


Java ByReference类代码示例

本文整理汇总了Java中com.sun.jna.ptr.ByReference的典型用法代码示例。如果您正苦于以下问题:Java ByReference类的具体用法?Java ByReference怎么用?Java ByReference使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ByReference类属于com.sun.jna.ptr包,在下文中一共展示了ByReference类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addPTZPreset

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
/**
 * 增加指定摄像机预置位
 * 
 * @param cameraCode
 *            摄像机编码
 * @param presetName
 *            预置位名字
 * @return SDKResult<Integer> 领域层封装的返回码对象
 * @see [类、类#方法、类#成员]
 * @since [eSDK IVS V100R003C00]
 */
@Override
public SDKResult<Integer> addPTZPreset(String cameraCode, String presetName) {
	int sessionId = super.getIVSSessionId();

	ByReference presetIndex = new IntByReference(-1);

	// modify by cWX191990, IVS
	// Bug:该接口的presetName不支持传String,且转成byte后还要固定长度84
	// 长度实际为20个字节,为防止溢出,定义长度为84
	int resultCode = super.getBaseCablilityJNA().IVS_SDK_AddPTZPreset(sessionId, cameraCode,
			BytesUtils.stringToBytesForIVS(presetName, CommonConstant.BusinessModule.IVS_PRESET_NAME_LEN),
			presetIndex);

	// 转换成领域层的bean
	SDKResult<Integer> result = new SDKResult<Integer>();

	if (0 == resultCode) {
		result.setResult(((IntByReference) presetIndex).getValue());
	}

	result.setErrCode(resultCode);
	return result;
}
 
开发者ID:Huawei,项目名称:eSDK_IVS_Java,代码行数:35,代码来源:BusinessMgrCability.java

示例2: addUser

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
/** 
 * 增加用户
 *
 * @param userInfo 用户信息
 * @return SDKResult<Integer> 封装领域层的SDKResult对象
 * @since eSDK IVS V100R003C00
 */
@Override
public SDKResult<Integer> addUser(UserInfo userInfo)
{
    int sessionId = getIVSSessionId();
    
    SDKResult<Integer> response = new SDKResult<Integer>();
    
    UserInfoSouth userInfoSouth = userMgrSouthConvert.getUserInfoModal2Soap(userInfo);
    
    ByReference refuserId = new IntByReference(-1);
    int errCode = super.getBaseCablilityJNA().IVS_SDK_AddUser(sessionId, userInfoSouth, refuserId);
    response.setErrCode(errCode);
    
    if (0 == errCode)
    {
        response.setResult(((IntByReference)refuserId).getValue());
    }
    
    return response;
}
 
开发者ID:Huawei,项目名称:eSDK_IVS_Java,代码行数:28,代码来源:UserMgrCabilityImpl.java

示例3: convolutionBackwardFilter

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
public void convolutionBackwardFilter(
		ByReference alpha,
		cudnnTensorDescriptor_t srcDesc,
		Pointer srcData,
		cudnnTensorDescriptor_t diffDesc,
		Pointer diffData,
		cudnnConvolutionDescriptor_t convDesc,
		int algo,
		Pointer workSpace,
		int workSpaceSizeInBytes,
		ByReference beta,
		cudnnFilterDescriptor_t gradDesc,
		Pointer gradData) throws CudnnException
{
	checkError(library.get().cudnnConvolutionBackwardFilter_v3(
			handle,
			alpha,
			srcDesc,
			srcData,
			diffDesc,
			diffData,
			convDesc,
			algo,
			workSpace,
			workSpaceSizeInBytes,
			beta,
			gradDesc,
			gradData));
}
 
开发者ID:cycentum,项目名称:birdsong-recognition,代码行数:30,代码来源:Cudnn.java

示例4: convolutionBackwardData

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
public void convolutionBackwardData(
		ByReference alpha,
		cudnnFilterDescriptor_t filterDesc,
		Pointer filterData,
		cudnnTensorDescriptor_t diffDesc,
		Pointer diffData,
		cudnnConvolutionDescriptor_t convDesc,
		int algo,
		Pointer workSpace,
		int workSpaceSizeInBytes,
		ByReference beta,
		cudnnTensorDescriptor_t gradDesc,
		Pointer gradData) throws CudnnException
{
	checkError(library.get().cudnnConvolutionBackwardData_v3(
			handle,
			alpha,
			filterDesc,
			filterData,
			diffDesc,
			diffData,
			convDesc,
			algo,
			workSpace,
			workSpaceSizeInBytes,
			beta,
			gradDesc,
			gradData));
}
 
开发者ID:cycentum,项目名称:birdsong-recognition,代码行数:30,代码来源:Cudnn.java

示例5: cudnnConvolutionBackwardFilter_v3

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
public int cudnnConvolutionBackwardFilter_v3(
cudnnHandle_t handle,
ByReference alpha,
cudnnTensorDescriptor_t srcDesc,
Pointer srcData,
cudnnTensorDescriptor_t diffDesc,
Pointer diffData,
cudnnConvolutionDescriptor_t convDesc,
int algo,
Pointer workSpace,
int workSpaceSizeInBytes,
ByReference beta,
cudnnFilterDescriptor_t gradDesc,
Pointer gradData);
 
开发者ID:cycentum,项目名称:birdsong-recognition,代码行数:15,代码来源:CudnnLibrary.java

示例6: cudnnConvolutionBackwardData_v3

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
public int cudnnConvolutionBackwardData_v3(
cudnnHandle_t handle,
ByReference alpha,
cudnnFilterDescriptor_t filterDesc,
Pointer filterData,
cudnnTensorDescriptor_t diffDesc,
Pointer diffData,
cudnnConvolutionDescriptor_t convDesc,
int algo,
Pointer workSpace,
int workSpaceSizeInBytes,
ByReference beta,
cudnnTensorDescriptor_t gradDesc,
Pointer gradData);
 
开发者ID:cycentum,项目名称:birdsong-recognition,代码行数:15,代码来源:CudnnLibrary.java

示例7: newByReference

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
protected ByReference newByReference() {
  ByReference s = new ByReference();
  s.useMemory(getPointer());
  write();
  s.read();
  return s;
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:8,代码来源:CFLibrary.java

示例8: GetQueuedCompletionStatus

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
boolean GetQueuedCompletionStatus(HANDLE CompletionPort,
IntByReference lpNumberOfBytes, ByReference lpCompletionKey,
PointerByReference lpOverlapped, int dwMilliseconds);
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:WindowsNotifier.java

示例9: const1

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
public static ByReference const1(FloatType floatType)
{
	if(floatType==FloatType.SINGLE) return FLOAT_1;
	else return DOUBLE_1;
}
 
开发者ID:cycentum,项目名称:birdsong-recognition,代码行数:6,代码来源:Cudnn.java

示例10: const0

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
public static ByReference const0(FloatType floatType)
{
	if(floatType==FloatType.SINGLE) return FLOAT_0;
	else return DOUBLE_0;
}
 
开发者ID:cycentum,项目名称:birdsong-recognition,代码行数:6,代码来源:Cudnn.java

示例11: convolutionForward

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
/**
 * Function to perform the forward multiconvolution<br>
 * Original signature : <code>cudnnStatus_t cudnnConvolutionForward(cudnnHandle_t, const void*, const cudnnTensorDescriptor_t, const void*, const cudnnFilterDescriptor_t, const void*, const cudnnConvolutionDescriptor_t, cudnnConvolutionFwdAlgo_t, void*, size_t, const void*, const cudnnTensorDescriptor_t, void*)</code><br>
 * <i>native declaration : line 407</i>
 * @throws CudnnException 
 */
public void convolutionForward(ByReference alpha, CudnnLibrary.cudnnTensorDescriptor_t srcDesc, Pointer srcData, CudnnLibrary.cudnnFilterDescriptor_t filterDesc, Pointer filterData, CudnnLibrary.cudnnConvolutionDescriptor_t convDesc, int algo, Pointer workSpace, int workSpaceSizeInBytes, ByReference beta, CudnnLibrary.cudnnTensorDescriptor_t destDesc, Pointer destData) throws CudnnException
{
	checkError(library.get().cudnnConvolutionForward(handle, alpha, srcDesc, srcData, filterDesc, filterData, convDesc, algo, workSpace, workSpaceSizeInBytes, beta, destDesc, destData));
}
 
开发者ID:cycentum,项目名称:birdsong-recognition,代码行数:11,代码来源:Cudnn.java

示例12: addTensor

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
/**
 * Tensor Bias addition : srcDest = alpha * bias + beta * srcDestDesc<br>
 * Original signature : <code>cudnnStatus_t cudnnAddTensor(cudnnHandle_t, cudnnAddMode_t, const void*, const cudnnTensorDescriptor_t, const void*, const void*, cudnnTensorDescriptor_t, void*)</code><br>
 * <i>native declaration : line 229</i>
 * @throws CudnnException 
 */
public void addTensor(int mode, ByReference alpha, CudnnLibrary.cudnnTensorDescriptor_t biasDesc, Pointer biasData, ByReference beta, CudnnLibrary.cudnnTensorDescriptor_t srcDestDesc, Pointer srcDestData) throws CudnnException
{
	checkError(library.get().cudnnAddTensor(handle, mode, alpha, biasDesc, biasData, beta, srcDestDesc, srcDestData));
}
 
开发者ID:cycentum,项目名称:birdsong-recognition,代码行数:11,代码来源:Cudnn.java

示例13: poolingForward

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
/**
 * Function to perform forward pooling<br>
 * Original signature : <code>cudnnStatus_t cudnnPoolingForward(cudnnHandle_t, const cudnnPoolingDescriptor_t, const void*, const cudnnTensorDescriptor_t, const void*, const void*, const cudnnTensorDescriptor_t, void*)</code><br>
 * <i>native declaration : line 581</i>
 * @throws CudnnException 
 */
public void poolingForward(CudnnLibrary.cudnnPoolingDescriptor_t poolingDesc, ByReference alpha, CudnnLibrary.cudnnTensorDescriptor_t srcDesc, Pointer srcData, ByReference beta, CudnnLibrary.cudnnTensorDescriptor_t destDesc, Pointer destData) throws CudnnException
{
	checkError(library.get().cudnnPoolingForward(handle, poolingDesc, alpha, srcDesc, srcData, beta, destDesc, destData));
}
 
开发者ID:cycentum,项目名称:birdsong-recognition,代码行数:11,代码来源:Cudnn.java

示例14: activationForward

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
/**
 * Function to perform forward activation<br>
 * Original signature : <code>cudnnStatus_t cudnnActivationForward(cudnnHandle_t, cudnnActivationMode_t, const void*, const cudnnTensorDescriptor_t, const void*, const void*, const cudnnTensorDescriptor_t, void*)</code><br>
 * <i>native declaration : line 619</i>
 * @throws CudnnException 
 */
public void activationForward(int mode, ByReference alpha, CudnnLibrary.cudnnTensorDescriptor_t srcDesc, Pointer srcData, ByReference beta, CudnnLibrary.cudnnTensorDescriptor_t destDesc, Pointer destData) throws CudnnException
{
	checkError(library.get().cudnnActivationForward(handle, mode, alpha, srcDesc, srcData, beta, destDesc, destData));
}
 
开发者ID:cycentum,项目名称:birdsong-recognition,代码行数:11,代码来源:Cudnn.java

示例15: softmaxForward

import com.sun.jna.ptr.ByReference; //导入依赖的package包/类
/**
 * Function to perform forward softmax<br>
 * Original signature : <code>cudnnStatus_t cudnnSoftmaxForward(cudnnHandle_t, cudnnSoftmaxAlgorithm_t, cudnnSoftmaxMode_t, const void*, const cudnnTensorDescriptor_t, const void*, const void*, const cudnnTensorDescriptor_t, void*)</code><br>
 * <i>native declaration : line 487</i>
 * @throws CudnnException 
 */
public void softmaxForward(int algorithm, int mode, ByReference alpha, CudnnLibrary.cudnnTensorDescriptor_t srcDesc, Pointer srcData, ByReference beta, CudnnLibrary.cudnnTensorDescriptor_t destDesc, Pointer destData) throws CudnnException
{
	checkError(library.get().cudnnSoftmaxForward(handle, algorithm, mode, alpha, srcDesc, srcData, beta, destDesc, destData));
}
 
开发者ID:cycentum,项目名称:birdsong-recognition,代码行数:11,代码来源:Cudnn.java


注:本文中的com.sun.jna.ptr.ByReference类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。