cdflib.setVarsCacheSize
모든 변수에 사용되는 캐시 버퍼 수 지정
구문
cdflib.setVarsCacheSize(cdfId,varNum,numBuffers)
설명
cdflib.setVarsCacheSize(cdfId,varNum,numBuffers)
는 다중 파일 형식 CDF(Common Data Format) 파일의 모든 변수에 대해 CDF 라이브러리가 사용하는 캐시 버퍼의 수를 지정합니다.
이 함수는 단일 파일 CDF에는 적용되지 않습니다. 캐싱에 대한 자세한 내용은 CDF User's Guide를 참조하십시오.
입력 인수
|
CDF 파일 ID로, |
|
파일의 변수를 식별하는 숫자형 값입니다. 변수 식별자(변수 번호)는 0부터 시작합니다. |
|
캐시 버퍼를 지정하는 숫자형 값입니다. |
예제
다중 파일 CDF를 만들고 모든 변수에 사용되는 버퍼의 수를 지정합니다. 이 예제를 실행하려면 폴더 쓰기가 가능해야 합니다.
cdfId = cdflib.create("your_file.cdf"); % Set the format of the file to be multi-file cdflib.setFormat(cdfId,"MULTI_FILE") % Create a variable in the file varNum = cdflib.createVar(cdfId,"Time","cdf_int1",1,[],true,[]); % Note how the library creates a separate file for the variable ls your_file.*
your_file.cdf your_file.z0
% Determine the number of cache buffers used with the variable
numBuf = cdflib.getVarCacheSize(cdfId,varNum)
numBuf = 1
% Specify the number of cache buffers used by all variables in CDF cdflib.setVarsCacheSize(cdfId,6) % Check the number of cache buffers used with the variable numBuf = cdflib.getVarCacheSize(cdfId,varNum)
numBuf = 6
% Clean up cdflib.delete(cdfId) clear cdfId
참고 문헌
이 함수는 CDF 라이브러리 C API 루틴 CDFsetzVarsCacheSize
에 대응합니다.
이 함수를 사용하려면 CDF C 인터페이스를 잘 알고 있어야 합니다. CDF 웹사이트에서 CDF 문서에 액세스할 수 있습니다.